bitten: update bitten.py

This commit is contained in:
Connor Olding 2022-06-19 02:48:10 -07:00
parent 191bdec97d
commit 3f5f1276c1

View file

@ -262,7 +262,7 @@ class Accuracy(AbstractError):
class Crossentropy(AbstractError):
def crossentropy(self, predictions, eps=1e-6):
def _compute(self, predictions, eps=1e-6):
p, t = np.clip(predictions, eps, 1 - eps), self.outputs
f = np.sum(-t * np.log(p) - (1 - t) * np.log(1 - p), axis=-1)
return np.mean(f)