DLS Week 1 Initialization: HE Initialization

Hi! I am doing the Week 1 assignment of initialization.
I tried doing the He initialization, and here is what I got:

This is how I write up the code:
parameters[‘W’+str(l)] = np.random.rand(layers_dims[l], layers_dims[l-1])*np.sqrt(2./layers_dims[l-1])
parameters[‘b’+str(l)] = np.zeros((layers_dims[l], 1))

Can anyone give me some hints?
Thank you!

Check your random number function and compare it to which function you are supposed to use.

1 Like

Got it! Now I fixed it! Thank you!

1 Like