Created
February 26, 2019 18:13
-
-
Save marcopeix/a83cf303c74baf2d4c8d4cb8dc6eaa5c 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 update_parameters(parameters, grads, learning_rate): | |
L = len(parameters) // 2 # number of layers in the neural network | |
for l in range(L): | |
parameters["W" + str(l+1)] = parameters['W' + str(l + 1)] - learning_rate * grads['dW' + str(l + 1)] | |
parameters["b" + str(l+1)] = parameters['b' + str(l + 1)] - learning_rate * grads['db' + str(l + 1)] | |
return parameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment