W1A1 problem in HE initialization

i write code below in initialize_parameters_he :

{moderator edit - solution code removed}

but when i run it it’s failing pass
i check w & b that my result is :

W1 = [[ 1.78862847  0.43650985]
 [ 0.09649747 -1.8634927 ]
 [-0.2773882  -0.35475898]
 [-0.08274148 -0.62700068]]
b1 = [[0.]
 [0.]
 [0.]
 [0.]]
W2 = [[-0.02190908 -0.23860902 -0.65693238  0.44231119]]
b2 = [[0.]]

that my w1 is same the true result but w2 is not same true result that write on next cell
becouse they are in same loop i wonder why code work with w1 but has wrong answer for w2
Expected output

Expected output

W1 = [[ 1.78862847  0.43650985]
 [ 0.09649747 -1.8634927 ]
 [-0.2773882  -0.35475898]
 [-0.08274148 -0.62700068]]
b1 = [[0.] [0.] [0.] [0.]]
W2 = [[-0.03098412 -0.33744411 -0.92904268  0.62552248]]
b2 = [[0.]]

Your code does not implement the correct formula for He Initialization. I’m not sure why it works for W1, but it is just wrong. Please compare your code to the math formula again. Why is there a product in the denominator of the term inside the square root? Where is that in the math formula?

yes that’s my mistake
thanks