Hi @oscar-defelice,
Congrats, you are making great progress.
The problem you describe does, indeed, look strange. I would suggest two things:
(1) Keep going and submit the notebook once you are done with all of it. There is no penalty for trying. This works if the next steps in your notebook pass their tests. If you start seeing more errors in the laters cells in the notebook, or if the submission comes back with an error, you’ll need to investigate further (step 2).
(2) Investigate further. I would propose adding some test code inside your upgrade_parameters. Please remove this code after you are done with the testing, it’s not correct in general, but will help with this particular issue.
In update_parameters, after you do your computation of W1, b1, W2, b2, copy and paste the following code:
## THIS IS A ONLY FOR DEBUGGING update_parameters_test in Exercise 7, please remove
W1 = np.array([[-0.00643025, 0.01936718],
[-0.02410458, 0.03978052],
[-0.01653973, -0.02096177],
[ 0.01046864, -0.05990141]])
b1 = np.array([[-1.02420756e-06],
[ 1.27373948e-05],
[ 8.32996807e-07],
[-3.20136836e-06]])
W2 = np.array([[-0.01041081, -0.04463285, 0.01758031, 0.04747113]])
b2 = np.array([[0.00010457]])
## END OF DEBUGGING CODE, please remove this code after debugging
Now run the cell for update_parameters and the test cell. Do you still get the error message? This version passes in my notebook. It should pass in yours. If not, there is something strange.
Now comment out my definition of W1. Do you still get an error for W1? And so forth.
Now you can compare the “correct” W1 (for the particular test case) given by the code snippet above and your calculation. Use print statements etc in your version.
Important: Once you find the problem, remove the extra code (like the code I gave above), then rerun the cell and the test cell. Make sure you pass before moving forward.
Let me know if that helps.
Good luck!
Petri