Course 2, Week 1, Exercise 3 - All tests pass, but grader gives me 80/100

I get “All tests pass” for each of the individual graded functions. Then the last one, I got the expected (incorrect) value so I fixed backward_propagation_n and got the following:
“Your backward propagation works perfectly fine! difference = 1.1890913024229996e-07”

For some reason the grader gives me the following:

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

Where do I even start debugging?

That value looks correct for the case that you’ve fixed the silly fake errors that they gave us in the back prop code. So perhaps the error is somewhere else. There are 4 graded functions in this exercise. They don’t give very good indications of success or failure on the 1D versions. Of course it’s sad that the grader can’t at least tell you which function it is not accepting. We’ve complained about this on multiple occasions to the course providers, but apparently this is some kind of limitation of the underlying Coursera grading platform.

Thanks Paul,

The first 3 exercises are really just setting variables equal to parameters (or a simple multiplication) so I’m guessing it’s in exercise 4. One thing that I found curious though was that in exercise 3 my backward propagation resulted in -1. While that certainly is less than the target, I wasn’t expecting a whole number.

As a lark I “un-fixed” backward_propagation_n but that didn’t change the grader result.

If you mean that your 1D gradient check gave the answer -1, that is where the error is. For starters note that the gradient check values are positive by definition, right? Everything in that computation is a norm and norms are positive.

Thanks Paul. That was the problem. I was subtracting instead of adding the two components of the denominator. Silly typo but I never would have found it without your confirmation that -1 was indeed wrong.

Great news! It is a relief that you were able to find the error from that clue. Onward! :nerd_face: