I am just learning backpropagation algorithm for NN and currently I am stuck with the right derivative of Binary Cross Entropy as loss function.
Here it is:
def binary_crossentropy(y, y_out):
return -1 * (y * np.log(y_out) + (1-y)*np.log(1-y_out))
def binary_crossentropy_dev(y, y_out):
return binary_crossentropy(y, y_out) * (1 - binary_crossentropy(y, y_out))
def binary_crossentropy_dev2(y, y_out):
return (y_out - y)/ (y_out * (1-y_out))
But when comparing both derivative above with real numbers, their results are differenct altough they should be the same. What am I doing wrong with the above equations? Thank you!