Week 1, Assignment 1, Convolution_model_Step_by_Step_v1, Exercise 3

For exercise 3, the second test pass but first does not.
I am not sure which part is the error from.

{moderator edit - solution code removed}

1 Like

Please don’t post your code on the forum. that’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you with instructions.

Hint: You haven’t included ‘stride’ in your calculations for the vert and horiz values. ‘stride’ is a multiplier for h and w.

2 Likes

Hint 2: Also, when you compute Z, please use your conv_single_step() function. That’s what it’s for.

1 Like

If Tom’s points are not enough to get you to a solution, here’s a thread that’s worth a look because it gives good instructions for the details of the algorithms required here.

2 Likes

I apologize for posting the code.

Adding the stride multiplier solved the issue.

Thank you @TMosh

1 Like

Thank you @paulinpaloalto, the description are indeed very detailed in that thread.