Course 4, week 3, Assignment 2

After completing the final assignment of course 4 week 3, with all test passed. I received 66 out of 100, and when I checked the grader output, it looks like shown below.

Grader Output:
Code Cell UNQ_C1: Function ‘conv_block’ is correct.
Code Cell UNQ_C2: Function ‘upsampling_block’ is correct.
Code Cell UNQ_C3: Function ‘unet_model’ is incorrect. Check implementation.
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.

Is it that I am doing something wrong or missing something important?

There’s an error in your unet_model().

thank you for your reply, but my all the test are passed. Do you think there can be some other error than that?

If you pass the tests in the notebook, but fail the grader, the most likely cause is that you “hard-coded” something so that it just happens to match the data used in the one test case. That means the code is not general. E.g. did you hard-code the number of classes to 23 instead of using the n_classes parameter in your model?

The high level point is that it’s hard to write tests that catch all possible bugs. Passing the test cases in the notebook is a necessary, but not sufficient, condition to pass the grader. This is not a bug in the grader: you need to “let go” of your assumption that because you pass the tests that implies your code is completely correct.

Thank you @paulinpaloalto for your valuable suggestion. You are right, I have hard-coded one parameter in the function. To be precise, I have hard-coded the value of number of filters ‘n_filters’ i.e. 32,64,128,256 and 512, but the correct version is n_filters,2n_filters,4n_filters,8n_filters and 16n_filters.
As you said before, still all the tests pass but also the grader output is correct.

Thank you for your support :))))