I got all tests passed and errors at the same time at "Exercise 3 - conv_forward"?

Hi Mentors and friends,

I am at the HW of “Convolution_model_Step_by_Step_v1
" of " Exercise 3 - conv_forward”.

Below are my code and screenshot (I will delete the pictures once the problem is resolved). It shows that all tests passed, but still have some errors in the “conv_single_step” ?? I am not very sure what’s going on here, could someone give me a hint ? Thank you!

Btw, all tests passed for the function “conv_single_step” as well. Please let me know if I need to copy the code to here or not.

You are literally hard-coding the “stride” value to 2 in your computations. How can that possibly pass all the tests? Some of them have stride values other than 2.

As it sounds like you are already aware, it’s against the rules to just post your code and say, in effect, “please fix it for me”. The debugging is supposed to be your job and we aren’t supposed to share code in a public way. Next time, please just post your exception trace or the failing test output. If we can’t figure out how to give advice based on that, then one of the mentors will DM you and ask to see your code privately.

2 Likes

Sorry about the pic. Pics are already deleted. I saw others post code like this way, that’s why I do it.

For the code, I will check it again tomorrow, especially one the stride part. Thank you

quick update. Yes, you are right, I hard-coded the stride. The problem is resolved, thank you!