Skip to content

Instantly share code, notes, and snippets.

@danielajisafe
Last active June 30, 2018 22:51
Show Gist options
  • Save danielajisafe/2ac9ee8acdbda2d0316e092b3713fd48 to your computer and use it in GitHub Desktop.
Save danielajisafe/2ac9ee8acdbda2d0316e092b3713fd48 to your computer and use it in GitHub Desktop.
for l in range(1, L + 1):
### START CODE HERE ### (≈ 2 lines of code)
parameters['W' + str(l)] = np.random.randn(layers_dims[l],layers_dims[l-1])*np.sqrt((2./layers_dims[l-1]))
parameters['b' + str(l)] = np.zeros((layers_dims[l],1))
### END CODE HERE ###
return parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment