def testValueErrorThrownWhenWeightIsNone(self):
    with self.cached_session():
      with self.assertRaises(ValueError):
        losses.log_loss(self._labels, self._labels, weights=None)