# Week 3 - C2 W3 Assignment

**URL:** <https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253>\
**Category:** Calculus for Machine Learning and Data Science\
**Tags:** week-module-2\
**Created:** [February 20, 2023, 7:19am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253 "2023-02-20T07:19:26Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [February 20, 2023, 7:19am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/1 "2023-02-20T07:19:26Z")

</div>

Good morning.

I had a problem with exercise 4 of the assignment.  
It seems that I get the wrong output for Z1 for X: 47 test passed and 1 Test failed.  
This has not impacted the further exercises of the test.  
If this is a bug, it would be great to have it fix.  
Agnese

 ![1](https://global.discourse-cdn.com/dlai/original/3X/8/3/8377025471b800c9ea1e48ebf48205e4d38a09c0.jpeg)

---

<div class="post-metadata">

**Author:** ![bs80](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@bs80](https://community.deeplearning.ai/u/bs80)\
**Post date:** [February 20, 2023, 4:25pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/2 "2023-02-20T16:25:07Z")

</div>

Have you tried submitting the assignment? I ran into something similar, but when I submitted, I still got full marks.

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [February 20, 2023, 5:47pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/3 "2023-02-20T17:47:49Z")

</div>

I had, and received full mark.  
I think that is this is a bug or something else, it needs to be fixed, so someone does not spend time trying to understand what is wrong.  
Agnese

---

<div class="post-metadata">

**Author:** ![yjcb22](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/yjcb22/32/127956_2.png) [@yjcb22](https://community.deeplearning.ai/u/yjcb22)\
**Post date:** [February 21, 2023, 3:35pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/4 "2023-02-21T15:35:19Z")

</div>

Dear Agnese,

Thanks for creating the new post. I am sorry I have not been able to answer yet. I am a bit behind this exercise yet. So, currently I am testing the Classification Lab, then I will continue with the Newtons lab and then I will get to this. So, bare with me. It will take me some time but eventually I will get to it, and when that time comes I will ping your for sure.

I am sorry, I have been slow but thing are crazy at work. So, I have not being able to get as much as time as I wish for the programing tasks. But, I will for sure 😉

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [February 22, 2023, 11:09am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/5 "2023-02-22T11:09:05Z")

</div>

Hi Yeison,  
no problem.  
I understand.  
All the best to you.  
Agnese

---

<div class="post-metadata">

**Author:** ![Carlos\_Merino](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Carlos\_Merino](https://community.deeplearning.ai/u/Carlos_Merino)\
**Post date:** [March 15, 2023, 3:52pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/6 "2023-03-15T15:52:47Z")

</div>

I have the same problem too:  
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

Is there any solution to this?

---

<div class="post-metadata">

**Author:** ![Carlos\_Merino](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Carlos\_Merino](https://community.deeplearning.ai/u/Carlos_Merino)\
**Post date:** [March 15, 2023, 4:14pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/7 "2023-03-15T16:14:13Z")

</div>

Also in exercise 7 I get this result could you help me please?  
Test case “extra\_check”. Wrong shape of the weights matrix W1.  
Expected: (3, 2).  
Got: (2, 2).  
Test case “extra\_check”. Wrong shape of the bias vector b1.  
Expected: (3, 1).  
Got: (2, 1).  
Test case “extra\_check”. Wrong shape of the weights matrix W2.  
Expected: (1, 3).  
Got: (1, 2).  
5 Tests passed  
3 Tests failed

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [March 15, 2023, 6:41pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/8 "2023-03-15T18:41:41Z")

</div>

Hi Carlos,  
if you submit the assignment, this will not be counted as missed.  
I received full mark for the assignment.  
It seems there is a not fixed bug.  
Agnese

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [March 15, 2023, 6:48pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/9 "2023-03-15T18:48:39Z")

</div>

Do you get this answer from C2-W3, question 7?  
Agnese

---

<div class="post-metadata">

**Author:** ![Carlos\_Merino](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Carlos\_Merino](https://community.deeplearning.ai/u/Carlos_Merino)\
**Post date:** [March 16, 2023, 1:16pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/10 "2023-03-16T13:16:27Z")

</div>

Thank you for the answer, it is Exercise 7 Build your neural network model in `nn_model()` of the assignement Neural Network with Two Layers .  
I tried to submit the assignment but got 0 marks.

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [March 16, 2023, 6:26pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/11 "2023-03-16T18:26:14Z")

</div>

Hi Carlos,  
I am sorry to hear that.  
Have you tried to contact the TA?  
I am just a student.  
If you share the code you have been using, perhaps I can help you.  
Agnese

---

<div class="post-metadata">

**Author:** ![Carlos\_Merino](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Carlos\_Merino](https://community.deeplearning.ai/u/Carlos_Merino)\
**Post date:** [March 17, 2023, 7:38am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/12 "2023-03-17T07:38:47Z")

</div>

how can I contact the TA?

---

<div class="post-metadata">

**Author:** ![Carlos\_Merino](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@Carlos\_Merino](https://community.deeplearning.ai/u/Carlos_Merino)\
**Post date:** [March 17, 2023, 8:02am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/13 "2023-03-17T08:02:07Z")

</div>

Exercise 4: forward propagation

# Implement forward propagation to calculate A2.

```
### START CODE HERE ### (~ 4 lines of code)
Z1 = np.dot(W1,X)+b1
A1 = sigmoid(Z1)
Z2 = np.dot(W2,A1)+b2
A2 = sigmoid(Z2)
### END CODE HERE ###

```

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [March 17, 2023, 6:40pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/14 "2023-03-17T18:40:46Z")

</div>

![forward propagation](https://global.discourse-cdn.com/dlai/original/3X/e/3/e3a25b996ae5c3b7d1df21fb0c6943c753ced8af.jpeg)

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [March 17, 2023, 6:47pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/15 "2023-03-17T18:47:56Z")

</div>

when you join the Community, look for the course you have been taking, then look at the post and who has created the post, and you will see if it is part of the DeepLearning AI team or a student.  
Send to the DeepLearning AI team a message, they will be back to you.

This is how it worked for me.  
Agnese

---

<div class="post-metadata">

**Author:** ![yjcb22](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/yjcb22/32/127956_2.png) [@yjcb22](https://community.deeplearning.ai/u/yjcb22)\
**Post date:** [April 3, 2023, 12:00am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/16 "2023-04-03T00:00:16Z")

</div>

@Agnese Hey I am back. I am sorry it took quite a while to make room on my schedule to finish the W3 testing. So, I am done with the assignment. Do you still need help? I can help you to understand the issue you are having in case you still have that question.

---

<div class="post-metadata">

**Author:** ![yjcb22](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/yjcb22/32/127956_2.png) [@yjcb22](https://community.deeplearning.ai/u/yjcb22)\
**Post date:** [April 3, 2023, 12:00am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/17 "2023-04-03T00:00:59Z")

</div>

@Carlos_Merino Were you able to fix your problem? I can help you in case you still need it.

---

<div class="post-metadata">

**Author:** ![Agnese](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Agnese](https://community.deeplearning.ai/u/Agnese)\
**Post date:** [April 3, 2023, 6:59am UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/18 "2023-04-03T06:59:34Z")

</div>

Good morning Yieson,

thank you for your offer.  
I have solved the problem I had.  
I wish you a good day.  
Agnese

---

<div class="post-metadata">

**Author:** ![yjcb22](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/yjcb22/32/127956_2.png) [@yjcb22](https://community.deeplearning.ai/u/yjcb22)\
**Post date:** [April 3, 2023, 1:55pm UTC](https://community.deeplearning.ai/t/week-3-c2-w3-assignment/277253/19 "2023-04-03T13:55:11Z")

</div>

Excellent news Agnese
