For zero padding i am using this code
{moderator edit - solution code removed}
Still it gives the error
AssertionError Traceback (most recent call last)
in
12 axarr[1].set_title(‘x_pad’)
13 axarr[1].imshow(x_pad[0, :, :, 0])
—> 14 zero_pad_test(zero_pad)
~/work/release/W1A1/public_tests.py in zero_pad_test(target)
27
28 assert type(x_pad) == np.ndarray, “Output must be a np array”
—> 29 assert x_pad.shape == (5, 4 + 2 * pad, 4 + 2 * pad, 3), f"Wrong shape: {x_pad.shape} != {(5, 4 + 2 * pad, 4 + 2 * pad, 3)}"
30 assert np.allclose(x_pad[0, 0:2,:, 0], [[0, 0, 0, 0, 0, 0, 0, 0],
31 [0, 0, 0, 0, 0, 0, 0, 0]], 1e-15), “Rows are not padded with zeros”
AssertionError: Wrong shape: (4, 7, 7, 2) != (5, 8, 8, 3)