I am getting this error on the test. I tried to change the stride length the padding I looked for syntax errors but nothing seems to work. Here is the error that I am getting. (This is in Residual_Networks the first function of the exersise.)
AssertionError Traceback (most recent call last)
Input In [49], in <cell line: 30>()
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 /tf/W2A1/public_tests.py:31, in identity_block_test(target)
28 assert np.all(A3np >= 0), “The ReLu activation at the last layer is missing”
29 resume = A3np[:,(0,-1),:,:].mean(axis = 3)
—> 31 assert np.floor(resume[1, 0, 0]) == 2 * np.floor(resume[1, 0, 3]), “Check the padding and strides”
32 assert np.floor(resume[1, 0, 3]) == np.floor(resume[1, 1, 0]), “Check the padding and strides”
33 assert np.floor(resume[1, 1, 0]) == 2 * np.floor(resume[1, 1, 3]), “Check the padding and strides”
AssertionError: Check the padding and strides
And here is my code for the function
{moderator edit - solution code removed}