# Failed Tests on final C2\_W3 Assignment, but received 100 points

**URL:** <https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635>\
**Category:** Calculus for Machine Learning and Data Science\
**Tags:** week-module-3\
**Created:** [February 3, 2023, 8:38am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635 "2023-02-03T08:38:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Askaleto](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Askaleto](https://community.deeplearning.ai/u/Askaleto)\
**Post date:** [February 3, 2023, 8:38am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/1 "2023-02-03T08:38:00Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [February 3, 2023, 9:04am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/2 "2023-02-03T09:04:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Askaleto](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Askaleto](https://community.deeplearning.ai/u/Askaleto)\
**Post date:** [February 3, 2023, 1:06pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/3 "2023-02-03T13:06:22Z")

</div>

> [@gent.spah](#):
>
> n 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!

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.

---

<div class="post-metadata">

**Author:** ![shivanandmn](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/shivanandmn/32/1206_2.png) [@shivanandmn](https://community.deeplearning.ai/u/shivanandmn)\
**Post date:** [February 4, 2023, 3:51pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/4 "2023-02-04T15:51:46Z")

</div>

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

 ![image](https://global.discourse-cdn.com/dlai/original/3X/0/2/027f4eff2a542091f5027754415bf42403989548.png)  
all the other tests are passed!  
what would be the issue?

---

<div class="post-metadata">

**Author:** ![annoyingCode](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/annoyingcode/32/159464_2.png) [@annoyingCode](https://community.deeplearning.ai/u/annoyingCode)\
**Post date:** [February 5, 2023, 8:30am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/5 "2023-02-05T08:30:24Z")

</div>

Hi.

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

---

<div class="post-metadata">

**Author:** ![Askaleto](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@Askaleto](https://community.deeplearning.ai/u/Askaleto)\
**Post date:** [February 5, 2023, 9:27am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/6 "2023-02-05T09:27:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andrea7](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Andrea7](https://community.deeplearning.ai/u/Andrea7)\
**Post date:** [February 7, 2023, 11:32am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/7 "2023-02-07T11:32:43Z")

</div>

I have the same issue and same 95%

---

<div class="post-metadata">

**Author:** ![lucas.coutinho](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lucas.coutinho/32/155465_2.png) [@lucas.coutinho](https://community.deeplearning.ai/u/lucas.coutinho)\
**Post date:** [February 9, 2023, 2:14pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/8 "2023-02-09T14:14:35Z")

</div>

Hi all!

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

Thanks,  
Lucas

---

<div class="post-metadata">

**Author:** ![GMSR](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@GMSR](https://community.deeplearning.ai/u/GMSR)\
**Post date:** [February 17, 2023, 1:46am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/9 "2023-02-17T01:46:28Z")

</div>

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

 ![Server Error final Programming Exercise W3](https://global.discourse-cdn.com/dlai/original/3X/0/8/08a194fc835729ba957ecb06ae988f9faa626919.jpeg)

---

<div class="post-metadata">

**Author:** ![daniilkorotin](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@daniilkorotin](https://community.deeplearning.ai/u/daniilkorotin)\
**Post date:** [March 1, 2023, 4:27pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/10 "2023-03-01T16:27:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ABCarter](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ABCarter](https://community.deeplearning.ai/u/ABCarter)\
**Post date:** [March 2, 2023, 7:04pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/11 "2023-03-02T19:04:23Z")

</div>

Same problem here as well.

---

<div class="post-metadata">

**Author:** ![Writobrata](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@Writobrata](https://community.deeplearning.ai/u/Writobrata)\
**Post date:** [March 2, 2023, 9:10pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/12 "2023-03-02T21:10:16Z")

</div>

Same issue…getting 95/100

---

<div class="post-metadata">

**Author:** ![AntonB](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/antonb/32/25785_2.png) [@AntonB](https://community.deeplearning.ai/u/AntonB)\
**Post date:** [March 6, 2023, 10:07am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/13 "2023-03-06T10:07:04Z")

</div>

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

Regards,

Anton

---

<div class="post-metadata">

**Author:** ![lucas.coutinho](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lucas.coutinho/32/155465_2.png) [@lucas.coutinho](https://community.deeplearning.ai/u/lucas.coutinho)\
**Post date:** [March 6, 2023, 12:24pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/14 "2023-03-06T12:24:44Z")

</div>

Hi all,

The issue was fixed. Could you all please follow the instructions in [Refresh your Notebook, here](https://www.coursera.org/learn/machine-learning-calculus/item/rBJgx)?

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

---

<div class="post-metadata">

**Author:** ![Igor\_Kuts](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@Igor\_Kuts](https://community.deeplearning.ai/u/Igor_Kuts)\
**Post date:** [March 6, 2023, 6:02pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/15 "2023-03-06T18:02:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AntonB](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/antonb/32/25785_2.png) [@AntonB](https://community.deeplearning.ai/u/AntonB)\
**Post date:** [March 8, 2023, 2:22pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/16 "2023-03-08T14:22:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lucas.coutinho](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lucas.coutinho/32/155465_2.png) [@lucas.coutinho](https://community.deeplearning.ai/u/lucas.coutinho)\
**Post date:** [March 8, 2023, 3:28pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/17 "2023-03-08T15:28:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paul\_Hume](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@Paul\_Hume](https://community.deeplearning.ai/u/Paul_Hume)\
**Post date:** [March 9, 2023, 7:28pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/18 "2023-03-09T19:28:13Z")

</div>

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.

 ![Screenshot 2023-03-09 at 1.27.16 PM](https://global.discourse-cdn.com/dlai/original/3X/d/6/d6c967f6198e8a2b8137d4472292a6b335ee1366.png)

---

<div class="post-metadata">

**Author:** ![AntonB](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/antonb/32/25785_2.png) [@AntonB](https://community.deeplearning.ai/u/AntonB)\
**Post date:** [March 10, 2023, 6:02am UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/19 "2023-03-10T06:02:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vaso\_Sapouna](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Vaso\_Sapouna](https://community.deeplearning.ai/u/Vaso_Sapouna)\
**Post date:** [March 11, 2023, 3:26pm UTC](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635/20 "2023-03-11T15:26:51Z")

</div>

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

[Next page](https://community.deeplearning.ai/t/failed-tests-on-final-c2-w3-assignment-but-received-100-points/267635.md?page=2)
