Convolution_model_Step_by_Step_v1 75/100 after passing all tests

I am able to pass all tests but after submission the grader says that “tests failed on 1 cell”.
I have gone through similar questions here but was not able to identify what is wrong with my code.

The tests in the notebook do not catch the errors if you ignore the stride on conv_forward and pool_forward. But note that you only failed one of them (although unfortunately the grader is not able to tell you which one), so compare your stride logic between the two cases. It should be the same in both cases.

Note that we have filed a bug about the fact that the test cases don’t catch this. I also consider it a bug that the grader can’t be bothered to tell you which function is wrong, but apparently that is a limitation of the grading platform that is hard for the course staff to get around.

The stride logic is same for both conv_forward and pool_forward functions. Its hard to imagine but could it be possible that other functions like conv_single_step or zero_pad could have errors?

I will go through all the functions once again to see if I can find any errors.
Also are there any custom test cases (apart from the notebook tests) that we can try to verify that the functions are actually correct?

It turns out that the problem was returning type np.float32 from conv_single_step. The unit tests in the notebook accept that solution, but the grader does not. Please try returning type np.float64 and that should work.

I have filed a bug to get the test case in the notebook fixed not to allow returning np.float32.

2 Likes