Convolution_model_step_by_step_v1 Exercise 3 - conv_forward error

Implemented the function conv_forward(A_prev, W, b, hparameters) as per the instruction. Test case 2 passed but Test case 1.

Attached a screenshot of the error.

Has anyone got the same error?

As the second test case is successful the code is likely to be correct


, I suspect some problem with test case 1 target outputs?

Could you please share your inputs / thoughts on it.

1 Like

The most common thing that trips people up on conv_forward and pool_forward is correctly handling the stride. Remember that the loops here are over the output space and we must touch every position in the output space and not skip any. The stride happens in the input space.

1 Like

Thank you Paul. There was a problem with the stride indices. fixed it now.