Course 4, week1 assignment1 exercise 3 broadcast issue

That’s a good point. I think you should also look at your handling of the stride. The fact that you basically ran off the end A_prev_pad in the h dimension and ended up with 2 instead of 3 there indicates that your vert_start value is incorrect. I think one way to get that type of error is to include the stride in the “range” of the h and w loops. That’s a mistake, but you don’t notice until you try a stride value > 1. The way to think of this is that the loops are over the output space, right? Meaning that you need to touch each position and not skip any. The stride happens in the input space, not the output space.