That indicates your code is incorrect.
I was conscious of that
Any hint on how to correct it?
This might happen when your code at the step where it computes the dimension of n_W does not follow the actual formula for n_W.
This is conv_forward
. There are lots of moving parts there and lots of ways for things to go wrong. Notice that you also failed the first test in that the output values are wrong. In test 1, the stride is 2, so the most common mistake that causes problems on test 1 is leaving out the stride. The key thing to remember is that the loops here are over the output space and we must touch every point of the output space, but the striding (skipping) happens in the input space. It is involved in calculating vert_start
and horiz_start
. It looks like you’re not skipping any positions in the output space (none of the checked Z values are 0), but perhaps you just left out the stride altogether in the vert_start
and horiz_start
calculations.
That’s one thing to check anyway …