Failed Tests on final C2_W3 Assignment, but received 100 points

Hello community,
I have just finished Course nr. 2 " Calculus for Machine Learning and Data Science".
C2_W3_Assignment is about creating a NN with two layers. There was something strange when implementing the function: forward_propagation(X, parameters)
I have calculated Z1 using the matrix multiplication formula:
Z1 = W1 @ X + b1
However, the later unittests “w3_unittest.test_forward_propagation(forward_propagation)”
produced the following result:

Test case "change_weights_check". Wrong output of Z1 for X = 
[[ 5.46584646  6.71120407  7.21301753 ...  1.77559174  3.52245562
   7.86492998]
 [ 2.91868287 10.31812597  7.79616824 ...  2.43434264  3.64044705
   6.77517917]]
Test for i = 1, j = 1999. 
	Expected: 
-0.03577862954823146
	Got: 
-0.03577862954823145
 47  Tests passed
 1  Tests failed

So how this is possible? To have 47 tests passed and one failed. When I submitted the assignment, I got 100/100 points.
Is this a bug or I really missed something in the implementation?
I can provide more info about the actual definition of the forward_propagation function, but I don’t want to break the rules and give possible solutions to the assignment.

I hope someone will be able to clarify this.
Thank you and I really enjoyed the course.

5 Likes

I see here that the difference between expected and got outputs is very very minimal, and since you passed the assignment with 100 score, I would say there might something with the internals of python variables accuracies. Maybe if you run this cell again the fail might go way!

1 Like

I tried to run the cell a few times, but there was always one failed test. I knew from the fact that 47 succeeded that my implementation was OK. Since difference is really small I guess that tolerance within he test itself could be a little bigger. Failed test is probably due to round off error.

1 Like

I had the same issue as @Askaleto had, I got 95%,


all the other tests are passed!
what would be the issue?

1 Like

Hi.

I am also having the same issues with same test case. Let’s hope the team fix this ASAP.

1 Like

Yes, the test is not properly implemented. This is very small (negligible) difference between actual and expected value and it should go within tolerance to be considered an exact value.

1 Like

I have the same issue and same 95%

1 Like

Hi all!

Thanks for noticing this, I have informed our Curriculum Engineer. We will keep you updated regarding the fix.

Thanks,
Lucas

2 Likes

Thanks, I have got the same issue. (47 Passed, One failed) and then 95 % grade because of that.

1 Like

Same problem here. Rerunning the notebook won’t help. My grade was 95%, too.

1 Like

Same problem here as well.

Same issue…getting 95/100

Thanks Lucas - I can confirm same issue with my submission.
Any updates yet?

Regards,

Anton

Hi all,

The issue was fixed. Could you all please follow the instructions in Refresh your Notebook, here?

Usually, if you have already started a session and it gets updated later on, the updated files will not automatically appear in you session - this happens to prevent any loss of progress.

If, after following these steps, the problem still persists, please let me know.

Thanks,
Lucas

Same issue for me. 95/100. Refreshing notebook wont help as of now

Hi Lucas,

I refreshed the notebook as suggested and resubmitted, and I still only receive 95%.

Specifically, according to the grader feedback, the weights matrices and bias vectors (W1, W2, b1, b2) do not match the expected values (as below).

Failed test case: “extra_check”. Wrong weights matrix W1…
Expected:
[[-0.05350702 -0.10250995]
[-0.07303197 -0.1295294 ]
[-0.07487082 -0.11145172]],
but got:
[[-0.88792757 -2.15678679]
[-0.90083658 -2.29294507]
[-0.90485966 -2.2175348 ]].

Any other suggestions to resolve the issue?

Thanks,

Anton

Hey guys, it doesn’t look like there is a problem in any unit test nor the grader, as I can get 100% of grading here.

Could you guys check if you the matrices W1 and W2 in exercise 3 are correctly defined? You should use np.random.randn and not np.random.rand or other function.

You can also send me your notebook privately so I can have a look at it.

Thanks,
Lucas

I’m having the same problem as the others. It did pass my notebook with no deductions but I was stumped on the very same test failure for a while. I continued the rest of the assignment but I was struggling at this point until I saw everyone else was having the same problem with the grader.

Hi Lucas,

I’m not sure what changed, but I tried the exercise again from scratch this morning, still had a failing unittest on Exercise 4, but this time the autograder didn’t have an issue with Exercise 7 as before and I received full marks.

Thanks for helping!

Anton

hello i am new here and i dont understand some things in the assgnment , can some one help me please