Code runs with no errors ... but received a 66/100 at submission

This is the Residual_Networks assignment that I’m referencing.
Thoughts?

These are the errors I received
Code Cell UNQ_C1: Function ‘identity_block’ is correct.
Code Cell UNQ_C2: Function ‘convolutional_block’ is correct.
Code Cell UNQ_C3: Unexpected error (ValueError(‘Operands could not be broadcast together with shapes (4, 4, 512) (4, 4, 1024)’)) occurred during function check. We expected function ResNet50 to return ResNet50 test 1 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

If you are sure that the tests in the notebook passed, then this error has the flavor that you probably hard-coded something so that it matches the value in the test case, but the grader has used a test case with a different dimension. You should check your code for ResNet50 again with that thought in mind. Notice that the number of channels is wrong, which narrows down the possibilities for where to look.

Actually there is one other important thing to note here: the graders in Course 4 work differently than they did in the earlier courses. In particular, they do not do an automatic “Save” for you when you click “Submit”. So what the grader actually got may be different than what you are looking at. Try “Kernel → Restart and Clear Output”. Then click “Save”. Then “Cell → Run All”. Check that all the internal notebook tests pass. Then click “Submit Assignment” and see what happens.

restarting the kernel and resubmitting

that was it … thank you.

That’s good to hear. Thanks for confirming! You had me worried there for a while :grin:

1 Like

I have been trying to submit my assignment and gettting similar error.
I tried the Restart and Save and Run All steps you’ve mentioned above.
Below are the errors:

Code Cell UNQ_C1: Function ‘triplet_loss’ is correct.
Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function verify to return verify test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Function ‘who_is_it’ is correct.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

I see that it flags something called ‘isfinite’ in the verify function probably.
Do you see anything wrong with my code?
All tests are passing.

I can’t see your code, but the one important thing to check is mentioned on this past thread. Note that you can use either numpy or TF functions to write the code in verify, but you have to be consistent and not mix them: either use all numpy functions or all tensor functions.

Thanks for your reply.
It was my bad actually. Forgot to set the door_open variable to True/False and was returning None instead. The grader wasn’t able to derive the type for the return values of verify.