Created
October 24, 2018 15:37
-
-
Save muhammadgaffar/616fe32068ee9359de9c5c255cd84deb 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 initialize_parameters_he(layer_dims): | |
parameters = {} | |
L = len(layer_dims) | |
for l in range(1,L): | |
parameters['W'+str(l)] = np.random.randn(layer_dims[l],layer_dims[l-1])*np.sqrt(2./(layer_dims[l-1])) | |
parameters['b'+str(l)] = np.zeros((layer_dims[l],1)) | |
return parameters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment