Created
September 20, 2018 15:01
-
-
Save ImadDabbura/a64eb6380365b75a818aef38037dcaf6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Compute cross-entropy cost | |
| def compute_cost(AL, y): | |
| m = y.shape[1] | |
| cost = - (1 / m) * np.sum( | |
| np.multiply(y, np.log(AL)) + np.multiply(1 - y, np.log(1 - AL))) | |
| return cost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment