Need help with exercise 4, Assginment 2, Week 4

I believe I coded exercise 4 correctly. but all 4 tests have failed.
I cannot find anything wrong with my code.
I tried to debug my code, and when I opened the public_tests.py,
I am not seeing the expected values that I set in initialize_parameters(n_x,n_h,n_y) routine:

 expected_parameters = {'W1': np.array([[ 0.01624965, -0.00610741, -0.00528734, -0.01072836,  0.008664  ,
                                 -0.02301103,  0.01745639, -0.00760949,  0.0031934 , -0.00248971],
                                [ 0.01462848, -0.02057904, -0.00326745, -0.00383625,  0.01138176,
                                 -0.01097596, -0.00171974, -0.00877601,  0.00043022,  0.00584423],
                                [-0.01098272,  0.01148209,  0.00902102,  0.00500958,  0.00900571,
                                 -0.00683188, -0.00123491, -0.00937164, -0.00267157,  0.00532808],
                                [-0.00693465, -0.00400047, -0.00684685, -0.00844447, -0.00670397,
                                 -0.00014731, -0.01113977,  0.00238846,  0.0165895 ,  0.00738212]]),
                         'b1': np.array([[ 1.10437111e-05],
                                [ 1.78437869e-05],
                                [ 3.74879549e-05],
                                [-4.42988824e-05]]),
                         'W2': np.array([[-0.00200283, -0.00888593, -0.00751122,  0.01688162]]),
                         'b2': np.array([[-0.00689018]])}

But the initialize_parameters(n_x,n_h,n_y) initializes the b1 and b2 vectors to all zeros.
Am I missing something?
I updated the lab to the latest version.
I looked through my code again, and I don’t see anything wrong to fail all 4 tests.
Appreciate it if you can provide any guidance.
My lab id: vkfxvwem
Thanks,
Stephen

We can’t see your notebook. Which specific test case are you failing? Your title says that you are talking about Assignment 2, which is two_layer_model, but the problem you are describing does not sound like that. Is this really the Step by Step exercise?

Just in general, if you are testing a function like linear_activation_forward that takes the W and b values as inputs, why should the test case necessarily have to be the output of the initialize routines? The functions have to work in the middle of the iteration cycle as well as at the beginning, right? If the test cases use zero values for the b^{[l]}, then the test would not be able to catch the error if your code omitted the b values incorrectly. Hmmmmm. :thinking:

Thanks for answering my question, Paul. Appreciate the tip!
I wish there was a better way to debug the code, similar to Matlab, where you can do single-step execution, and examine each of the variables at each step.
I had to closely examine my code, and rectify small typos. Also had an equation for compute_cost, rather than the routine itself.
Finally managed to graduate!