Created
November 11, 2018 07:50
-
-
Save mdhasanai/3dc2b7c5682e8f358dfe957756cd33e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compute_error(a3, Y): | |
m = Y.shape[0] | |
logprobs = np.multiply(-np.log(a3),Y) + np.multiply(-np.log(1 - a3), 1 - Y) | |
cost = 1./m * np.sum(logprobs) | |
return cost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment