When I test the identity_block assignment in W2A1, I get below error Wrong Values with Training - true
I checked the filter passed and other places, doesn’t seem to find the issue.
Please help
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
c:\CNN\Assignments\W2A1\Residual_Networks.ipynb Cell 12 line 3
26 A4 = identity_block(X, f=2, filters=[3, 3, 3],
27 initializer=lambda seed=0:constant(value=1))
28 print(np.around(A4.numpy()[:,(0,-1),:,:].mean(axis = 3), 5))
---> 30 public_tests.identity_block_test(identity_block)
File c:\CNN\Assignments\W2A1\public_tests.py:56, in identity_block_test(target)
54 A4np = A4.numpy()
55 resume = A4np[:,(0,-1),:,:].mean(axis = 3)
---> 56 assert np.allclose(resume,
57 np.array([[[0., 0., 0., 0., ],
58 [0., 0., 0., 0., ]],
59 [[0.37390518, 0.37390518, 0.37390518, 0.37390518],
60 [0.37390518, 0.37390518, 0.37390518, 0.37390518]],
61 [[3.2380054, 4.1391973, 4.1391973, 3.2380054 ],
62 [3.2380054, 4.1391973, 4.1391973, 3.2380054 ]]]),
63 atol = 1e-5 ), "Wrong values with training=True"
65 print(colored("All tests passed!", "green"))
AssertionError: Wrong values with training=True