Convolutional Neural Networks, Week 1

I have a problem with the function conv_forward in the Convolutional Neural Networks, Week 1, in the convolutional model step by step course. Can I have some help ?

% mentor edit: code removed

I don’t understand why the dims don’t match.
Thank you for the help !
(The function conv_single_step is working)

You have to include the “stride” when you compute vert_start and horiz_start.

Please do not post your code on the Forums.

1 Like

In addition to the stride issue that Tom points out, you are also slicing the W value on the h and w dimensions the same way you slice the A_prev value. That is a mistake. Compare the shape of W to the shape of A_prev.

2 Likes

Thank you very much for the help ! How can I explain my issue without posting my code next time ?

Explain the problem.
Post any assert messages.
This is usually enough for us to guess what the problem is.
If we need to see your code, we’ll ask for it.

Thank you very much, it worked perfectly !