it shows the following error message "---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
in
3 print("A2 = " + str(A2))
4
----> 5 forward_propagation_test(forward_propagation)
~/work/release/W3A1/public_tests.py in forward_propagation_test(target)
108 assert output[1][“Z2”].shape == expected_Z2.shape, f"Wrong shape for cache[‘Z2’]."
109
→ 110 assert np.allclose(output[0], expected_A2), “Wrong values for A2”
111 assert np.allclose(output[1][“Z1”], expected_Z1), “Wrong values for cache[‘Z1’]”
112 assert np.allclose(output[1][“A1”], expected_A1), “Wrong values for cache[‘A1’]”
AssertionError: Wrong values for A2"
I actually printed W1, b1, W2, b2 and X to a separate Jupyter Notebook to calculate, the calculation of Z1, A1, Z2 in Jupyter Notebook matched with Coursera assignment, but the calculation of A2 is different. I got Z2 in both as array([[-2.43884496e-04, 8.70207555e-05, 1.07176527e-04]]), if using A2 = sigmoid(Z2), I got A2=array([[0.49993903, 0.50002176, 0.50002679]]), but the test expects to get
A2 = [[0.21292656 0.21274673 0.21295976]], and reports Wrong values for A2.
Please help.
thanks