C4W1 1st assignment pass all tests but grader saying failing on 1 cell

When I code and run the first assignment for W1, I passed all tests for graded function, but after I submitted it, the autograder comments below:
Tests failed on 1 cell(s)! These tests could be hidden. Please check your submission.

If some tests are hidden, how can I know which part of the code is wrong and can I get more specific error messages?

Many Thanks!

I believe all of the test functions can be viewed from the Files menu of the notebook:
test_utils.py
public_tests.py
hidden_tests.py

The “grader output” messages should also tell you which tests were failed.

Example:

The “hidden” tests are those used by the grader.

Thank you TMosh.

I only see below comments and it didn’t mention which cells failed:

Please let me know if there’s a way to know which cells it referred to, meanwhile, I will check files you mentioned earlier:
test_utils.py
public_tests.py
hidden_tests.py

It is a very unfortunate behavior of the graders here that there are some cases in which they can’t tell you which function is wrong. Believe me, we have complained vigorously about this to the course staff, but apparently it’s not so easy to fix. Some kind of limitation of the underlying platform from Coursera. Sigh …

I would start by assuming it is your conv_forward logic that is wrong: that’s the really hard part of this assignment. Are you sure you are correctly applying the “stride” value when you compute the vertical and horizontal “start” positions in the input space?

I added instrumentation to my code to show the shapes of things and also to print the (h, w, c) values and the corresponding (vert_start, horiz_start) at the beginning of each iteration of the innermost loop. Here’s the print statement:

print(f"Inner loop for ({h},{w},{c}) has corner ({vert_start}, {horiz_start})")

Then I added a new test cell with stride = 2:

# Test case with pad = 0 and stride = 2
np.random.seed(1)
A_prev = np.random.randn(2, 5, 7, 4)
W = np.random.randn(3, 3, 4, 8)
b = np.random.randn(1, 1, 1, 8)
Z, cache_conv = conv_forward(A_prev, W, b, {"pad" : 0, "stride": 2})

When I run that, here’s the output for comparison purposes:

New dimensions = 2 by 3
Shape Z = (2, 2, 3, 8)
Shape A_prev_pad = (2, 5, 7, 4)
a_prev_pad shape = (5, 7, 4)
Inner loop for (0,0,0) has corner (0, 0)
Z[0,0,0,0] = 1.2662814823774746
Inner loop for (0,0,1) has corner (0, 0)
Inner loop for (0,0,2) has corner (0, 0)
Inner loop for (0,0,3) has corner (0, 0)
Inner loop for (0,0,4) has corner (0, 0)
Inner loop for (0,0,5) has corner (0, 0)
Inner loop for (0,0,6) has corner (0, 0)
Inner loop for (0,0,7) has corner (0, 0)
Inner loop for (0,1,0) has corner (0, 2)
Inner loop for (0,1,1) has corner (0, 2)
Inner loop for (0,1,2) has corner (0, 2)
Inner loop for (0,1,3) has corner (0, 2)
Inner loop for (0,1,4) has corner (0, 2)
Inner loop for (0,1,5) has corner (0, 2)
Inner loop for (0,1,6) has corner (0, 2)
Inner loop for (0,1,7) has corner (0, 2)
Inner loop for (0,2,0) has corner (0, 4)
Inner loop for (0,2,1) has corner (0, 4)
Inner loop for (0,2,2) has corner (0, 4)
Inner loop for (0,2,3) has corner (0, 4)
Inner loop for (0,2,4) has corner (0, 4)
Inner loop for (0,2,5) has corner (0, 4)
Inner loop for (0,2,6) has corner (0, 4)
Inner loop for (0,2,7) has corner (0, 4)
Inner loop for (1,0,0) has corner (2, 0)
Inner loop for (1,0,1) has corner (2, 0)
Inner loop for (1,0,2) has corner (2, 0)
Inner loop for (1,0,3) has corner (2, 0)
Inner loop for (1,0,4) has corner (2, 0)
Inner loop for (1,0,5) has corner (2, 0)
Inner loop for (1,0,6) has corner (2, 0)
Inner loop for (1,0,7) has corner (2, 0)
Inner loop for (1,1,0) has corner (2, 2)
Inner loop for (1,1,1) has corner (2, 2)
Inner loop for (1,1,2) has corner (2, 2)
Inner loop for (1,1,3) has corner (2, 2)
Inner loop for (1,1,4) has corner (2, 2)
Inner loop for (1,1,5) has corner (2, 2)
Inner loop for (1,1,6) has corner (2, 2)
Inner loop for (1,1,7) has corner (2, 2)
Inner loop for (1,2,0) has corner (2, 4)
Inner loop for (1,2,1) has corner (2, 4)
Inner loop for (1,2,2) has corner (2, 4)
Inner loop for (1,2,3) has corner (2, 4)
Inner loop for (1,2,4) has corner (2, 4)
Inner loop for (1,2,5) has corner (2, 4)
Inner loop for (1,2,6) has corner (2, 4)
Inner loop for (1,2,7) has corner (2, 4)
a_prev_pad shape = (5, 7, 4)
Inner loop for (0,0,0) has corner (0, 0)
Inner loop for (0,0,1) has corner (0, 0)
Inner loop for (0,0,2) has corner (0, 0)
Inner loop for (0,0,3) has corner (0, 0)
Inner loop for (0,0,4) has corner (0, 0)
Inner loop for (0,0,5) has corner (0, 0)
Inner loop for (0,0,6) has corner (0, 0)
Inner loop for (0,0,7) has corner (0, 0)
Inner loop for (0,1,0) has corner (0, 2)
Inner loop for (0,1,1) has corner (0, 2)
Inner loop for (0,1,2) has corner (0, 2)
Inner loop for (0,1,3) has corner (0, 2)
Inner loop for (0,1,4) has corner (0, 2)
Inner loop for (0,1,5) has corner (0, 2)
Inner loop for (0,1,6) has corner (0, 2)
Inner loop for (0,1,7) has corner (0, 2)
Inner loop for (0,2,0) has corner (0, 4)
Inner loop for (0,2,1) has corner (0, 4)
Inner loop for (0,2,2) has corner (0, 4)
Inner loop for (0,2,3) has corner (0, 4)
Inner loop for (0,2,4) has corner (0, 4)
Inner loop for (0,2,5) has corner (0, 4)
Inner loop for (0,2,6) has corner (0, 4)
Inner loop for (0,2,7) has corner (0, 4)
Inner loop for (1,0,0) has corner (2, 0)
Inner loop for (1,0,1) has corner (2, 0)
Inner loop for (1,0,2) has corner (2, 0)
Inner loop for (1,0,3) has corner (2, 0)
Inner loop for (1,0,4) has corner (2, 0)
Inner loop for (1,0,5) has corner (2, 0)
Inner loop for (1,0,6) has corner (2, 0)
Inner loop for (1,0,7) has corner (2, 0)
Inner loop for (1,1,0) has corner (2, 2)
Inner loop for (1,1,1) has corner (2, 2)
Inner loop for (1,1,2) has corner (2, 2)
Inner loop for (1,1,3) has corner (2, 2)
Inner loop for (1,1,4) has corner (2, 2)
Inner loop for (1,1,5) has corner (2, 2)
Inner loop for (1,1,6) has corner (2, 2)
Inner loop for (1,1,7) has corner (2, 2)
Inner loop for (1,2,0) has corner (2, 4)
Inner loop for (1,2,1) has corner (2, 4)
Inner loop for (1,2,2) has corner (2, 4)
Inner loop for (1,2,3) has corner (2, 4)
Inner loop for (1,2,4) has corner (2, 4)
Inner loop for (1,2,5) has corner (2, 4)
Inner loop for (1,2,6) has corner (2, 4)
Inner loop for (1,2,7) has corner (2, 4)
Z[1,1,2,7] = -2.065366459834221

Notice how the stride is working there. What do you see if you try the above?