Pool_forward

I have used stride
to jump over n_H and n_W and test one gave me all test passed but in the second test it say AssertionError: Wrong value for A[0] in mode max. Make sure you have included stride in your calculation
here this output

Maybe this guide helps.

1 Like

The key difference in the test cases is the first one has stride = 1 and the second one has stride = 2. The stride works the same way here that it did in conv_forward: you use it to compute vert_start and horiz_start. It is not involved in the ranges of the loops. You got some all zero values, which is clearly wrong and points to the type of error with the loop ranges.

1 Like