We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1dc5e5 commit 6deff0cCopy full SHA for 6deff0c
neural_network/binary_crossentropy.py
@@ -21,7 +21,7 @@ def binary_cross_entropy(y_true: np.ndarray, y_pred: np.ndarray) -> float:
21
return:
22
float: the output value of binary crossentropy
23
24
- Mathematically, BCE = -(1/N) * Sum(y_i * log(p_i) + (1 - y_i) * log(1 - p_i))
+ Mathematically, BCE = -(1/N)*Sum(y_i * log(p_i)+(1 - y_i) * log(1 - p_i))
25
26
Examples:
27
>>> binary_cross_entropy(np.array([1, 0, 1]), np.array([0.9, 0.2, 0.8]))
0 commit comments