I have tried to figure this out for the last 2 days but couldn’t so ask about it. What is wrong with my code that is not able to pass the tests.
{moderator edit - solution code removed}
np.random.seed(1)
A_prev = np.random.randn(2, 5, 5, 3)
hparameters = {“stride” : 1, “f”: 2}
A, cache = pool_forward(A_prev, hparameters, mode = “max”)