Thanks so much - here is the full output. I have added a number of print statements as well:
parameters, cache, t_X, t_Y = backward_propagation_test_case()
grads = backward_propagation(parameters, cache, t_X, t_Y)
print ("dW1 = "+ str(grads[“dW1”]))
print ("db1 = "+ str(grads[“db1”]))
print ("dW2 = "+ str(grads[“dW2”]))
print ("db2 = "+ str(grads[“db2”]))
backward_propagation_test(backward_propagation)
dZ1 is: [[-3.26004476e-05 -1.09075671e-05 1.84851426e-05]
[-2.37374037e-04 -1.23847186e-04 -1.20215524e-04]
[ 5.53878665e-05 1.01628980e-05 -7.94748317e-05]
[-2.46605107e-04 -1.58717233e-04 -2.97831053e-04]]
dW1 is: [[-1.86816473e-05 -5.66816846e-06]
[-8.21062208e-05 1.41399092e-04]
[ 4.19093891e-05 4.40933358e-05]
[-4.87232092e-05 2.70904710e-04]]
db1 is: [[-8.34095739e-06]
[-1.60478916e-04]
[-4.64135575e-06]
[-2.34384464e-04]]
dW1 = [[-1.86816473e-05 -5.66816846e-06]
[-8.21062208e-05 1.41399092e-04]
[ 4.19093891e-05 4.40933358e-05]
[-4.87232092e-05 2.70904710e-04]]
db1 = [[-8.34095739e-06]
[-1.60478916e-04]
[-4.64135575e-06]
[-2.34384464e-04]]
dW2 = [[ 0.00078841 0.01765429 -0.00084166 -0.01022527]]
db2 = [[-0.16655712]]
dZ1 is: [[-0.18971001 0.09749821 -0.09071685 -1.05286106 -0.7742922 1.0076847
-0.4663882 ]
[ 0.28017893 -0.2952923 -0.10045365 -0.31272244 1.02460768 0.31600204
0.38243472]
[-0.14182549 -1.56040309 0.02828891 0.22074501 -0.10490566 -0.46963613
0.10164975]
[-0.02249924 0.42123163 -0.01473512 -0.04108494 -0.19480444 -0.42116668
0.0291115 ]
[ 0.21989938 1.24339264 -0.05122532 -0.08084212 0.1838087 -0.04746717
-0.30212852]
[ 0.34859902 -0.74184141 0.12623696 0.35946419 0.27043228 -1.01602709
-0.07034865]
[-0.61420572 2.62781985 0.04557935 -0.04825444 1.03894577 -0.48569235
0.58364007]
[ 0.29185168 -0.39544046 0.09198354 0.023439 0.50051602 -0.70754
0.11546824]
[-0.00485776 -0.50818514 0.05188744 0.69246679 -0.33448209 0.45326614
-0.26711585]]
dW1 is: [[-0.42760887 0.0154449 0.24078632]
[ 0.26443449 -0.44275199 0.10582902]
[ 0.23426834 0.03633253 0.13811406]
[ 0.08702401 0.08872219 -0.10513384]
[-0.07835778 -0.01763681 -0.10369397]
[ 0.43105965 -0.03006614 0.0529339 ]
[ 0.06538961 -0.14056184 -0.63339413]
[ 0.41504288 -0.16919208 0.03015348]
[-0.32373508 0.2123736 0.06866423]]
db1 is: [[-0.20982649]
[ 0.184965 ]
[-0.27515524]
[-0.03484961]
[ 0.16649108]
[-0.10335496]
[ 0.44969036]
[-0.01138885]
[ 0.01185422]]
AssertionError Traceback (most recent call last)
in
7 print ("db2 = "+ str(grads[“db2”]))
8
----> 9 backward_propagation_test(backward_propagation)
~/work/release/W3A1/public_tests.py in backward_propagation_test(target)
187 assert output[“db2”].shape == expected_output[“db2”].shape, f"Wrong shape for db2."
188
→ 189 assert np.allclose(output[“dW1”], expected_output[“dW1”]), “Wrong values for dW1”
190 assert np.allclose(output[“db1”], expected_output[“db1”]), “Wrong values for db1”
191 assert np.allclose(output[“dW2”], expected_output[“dW2”]), “Wrong values for dW2”
AssertionError: Wrong values for dW1