When I test the my Optimize function, it passes, even though I think it has the wrong values for w. Then, when I run model test, my w values fail.
Here are the results from my Optimize test:
w = [[0.35627617]
[0.60199214]]
b = -0.14956979978997245
dw = [[-0.21189539]
[-0.33376766]]
db = -0.13290329100668047
Costs = [array(0.5826722)]
All tests passed!
There are two different tests for the optimize function: one directly in the notebook and one in the file public_tests.py.
If optimize passes the tests, but model fails, then that means your model code is probably calling optimize incorrectly. The most common type of error is “hard-coding” parameters or just relying on the default values: you have to respect the actual values being requested by the test for all the parameters like learning rate and number of iterations.