Week 4 - Programming Assignment 1 - Grader Gives 0 Points


In this assignment, all exercises (except exercise 1) pass all the tests, however the grader returns 0/100 points.

I have already tried the troubleshooting steps proposed in this post: Help! My code is correct, but the grader gives me 0 points! - Course 1 Version

I have also tried other troubleshooting techniques explained in other posts, such as cleaning cookies and cache, trying different browsers, double-checking that I am signed into the correct account, etc.

The link to the course item is here: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera

Is it possible to have course staff take a look directly in the notebook instead of going through all the troubleshooting again?

Thank you.

Please post a screen capture image that shows the detailed grader feedback.

Thanks for the quick reply @TMosh . I fixed a bug in Exercise 1 and now the grader returns a 100/100. So my problem is resolved.

However, it is still strange the the autograder would return a 0/100 when the remaining exercises were correct. So I will post the output of the autograder from the 0/100 submissions. See below:

[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W4A1/Building_your_Deep_Neural_Network_Step_by_Step.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
Tests failed on 10 cell(s)! These tests could be hidden. Please check your submission.

The following cell failed:

print("Test Case 1:\n")
parameters = initialize_parameters(3,2,1)

print("W1 = " + str(parameters["W1"]))
print("b1 = " + str(parameters["b1"]))
print("W2 = " + str(parameters["W2"]))
print("b2 = " + str(parameters["b2"]))


print("\033[90m\nTest Case 2:\n")
parameters = initialize_parameters(4,3,2)

print("W1 = " + str(parameters["W1"]))
print("b1 = " + str(parameters["b1"]))
print("W2 = " + str(parameters["W2"]))
print("b2 = " + str(parameters["b2"]))


The error was:

AssertionError                            Traceback (most recent call last)
<ipython-input-4-ff14dbec5020> in <module>
      7 print("b2 = " + str(parameters["b2"]))
----> 9 initialize_parameters_test_1(initialize_parameters)
     11 print("\033[90m\nTest Case 2:\n")

~/work/submitted/courseraLearner/W4A1/public_tests.py in initialize_parameters_test...
     31     ]
---> 33     multiple_test(test_cases, target)

~/work/submitted/courseraLearner/W4A1/test_utils.py in multiple_test(test_cases, ta...
    140         print('\033[92m', success," Tests passed")
    141         print('\033[91m', len(test_cases) - success, " Tests failed")
--> 142         raise AssertionError("Not all tests were passed for {}. Check your ...

AssertionError: Not all tests were passed for initialize_parameters. Check your equ...

It depends on the nature of your error on that one failing function. If it causes the grader not to be able to compile the code, then it can’t get as far as running the rest of the tests for the other functions.

It would be helpful, as Tom suggested, to see the actual output of the grader under “Show Grader Output”.

When the grader hits an assert, it stops running and you get a score of 0.

It’s not able to run your notebook if it contains runtime errors.

Thank you so much for all the help @TMosh and @paulinpaloalto . The nature of the error in exercise one was that I was calling the wrong random generator function. I confused “randn” and “rand”.