Last active
May 15, 2020 10:13
-
-
Save vamc-stash/f5eaa33973474c46746c88403f55e4b9 to your computer and use it in GitHub Desktop.
update parameters
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): | |
L = len(parameters) // 2 | |
for l in range(L): | |
parameters['W'+str(l+1)] = parameters['W'+str(l+1)] - epsilon * grads['dW'+str(l+1)] # W = W - lr*(dE/dW) | |
parameters['b'+str(l+1)] = parameters['b'+str(l+1)] - epsilon * grads['db'+str(l+1)] # b = b - lr*(dE/db) | |
return parameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment