C4 W1 Convolutional Neural Networks: Step by Step - conv_forward


I’m having difficulties with this exercise, and honestly, I thought my solution was correct. I’ve been trying to solve it for a few hours now and have also looked at some posts, but I haven’t been able to figure it out yet. Could you please help me? Here’s the image of the error I’m encountering.

Thank you in advance for your assistance.

If n_W is 4, the iteration of w should encounter values 0, 1, 2, 3. Accessing at offset 4 is clearly a mistake. In python, range(4) will yield values 0, 1, 2, 3. Please check your iteration logic.

Oh, thank you. Now I realized that I was iterating over n_H_prev.