DLS Course 4 Week1 A1: All test passed but grade is 75/100

Hello, My code for A1 (convolution step-by-step) passed all the tests, but one of the cell seems failing while grading with the following message:

Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.

Not sure where the error is. Anyone else having the same issue? Thanks in advance.


Is there any additional text in the “grader output” message about which tests failed?

There are several things that can cause this on that assignment: omitting the stride in the computations for either conv_forward or pool_forward will pass the tests in the notebook, but fail the grader. The stride logic should be the same in both. Since you got 75/100, at least one of those functions must be correct. Coercing the output type of conv_single_step to float32 will also cause a loss of points.

I don’t know why the grader here can’t at least tell you which functions failed. We’ve complained about this for a long time to the course staff, but apparently this limitation of the grader is hard for them to fix.


I have the same issue but mine is 50/100.

Tests failed on 2 cell(s)! These tests could be hidden. Please check your submission.
1 Like

No, there isn’t any indication of which test failed.

Thank you, @paulinpaloalto. In my case, I was converting Z in conv_single_step to float32 which was loosing some accuracy but close enough to pass the test. I changed that to float64 and when Z exactly matches the given value in the test, my grading issue is resolved.

However, the grader’s feedback should at least point to the cell(s) failing the test.


Hi @agneshe, One issue might be related to floating point conversion in conv_single_step. My issue is now resolved after converting to float64 instead of float32.

Yes, sorry, but it is a known problem that the grader doesn’t give useful feedback in many cases like this. We’ve asked the course staff about this and apparently it is not so easy to work around the limitations of the Coursera grading platform in these cases.

FYI, my code uses np.float() and passes the grader. So either np.float() or np.float64() works.

Just to clarify this misunderstanding:
np.float32 does not cause a loss of accuracy. The issue is that if Z is float64, and you cast ‘b’ as float32, then when you add them you get an ndarray, not a float. It’s the type mismatch that causes the error.

1 Like

I found if i write:

{moderator edit - solution code removed}

that’s wrong solution but the test still correct!
I sloved it by correct

{moderator edit - solution code removed}

edit this for bolt pool_forward() and conv_forward(). Finally I passed 100/100

Glad to hear you found the solution. Yes, sorry, it is a known problem that the unit tests to not flag that error of omitting the stride. There actually are some values that show as wrong in the stride = 2 test case for pool_forward, but you just have to look carefully to notice. No error message is printed.

A bug has been filed about this for a couple of months at this point.

1 Like