dw = [[-0.08079671]
[-1.12687945]]
db = 0.20650798115359614
cost = 2.1256720437436023
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-12-7cd89fb9dcd2> in <module>
14 print ("cost = " + str(cost))
15
---> 16 propagate_test(propagate)
~/work/release/W2A2/public_tests.py in propagate_test(target)
39 assert type(grads['dw']) == np.ndarray, f"Wrong type for grads['dw']. {type(grads['dw'])} != np.ndarray"
40 assert grads['dw'].shape == w.shape, f"Wrong shape for grads['dw']. {grads['dw'].shape} != {w.shape}"
---> 41 assert np.allclose(grads['dw'], expected_dw), f"Wrong values for grads['dw']. {grads['dw']} != {expected_dw}"
42 assert np.allclose(grads['db'], expected_db), f"Wrong values for grads['db']. {grads['db']} != {expected_db}"
43 assert np.allclose(cost, expected_cost), f"Wrong values for cost. {cost} != {expected_cost}"
AssertionError: Wrong values for grads['dw']. [[-0.21186069]
[-0.42784094]
[-1.55246367]] != [[-0.03909333]
[ 0.12501464]
[-0.99960809]]
Expected output
dw = [[ 0.25071532]
[-0.06604096]]
db = -0.1250040450043965
cost = 0.15900537707692405
Getting the error mentioned above! I am stuck on this problem for about 3 hours and tried to debug the code in every way I possibly could, but nothing’s working, even tried a fresh copy of the notebook which was a possible fix for this as mentioned in other threads, but still not working. Any help is appreciated!