# HELP - AssertionError First required coding assignment

**URL:** <https://community.deeplearning.ai/t/help-assertionerror-first-required-coding-assignment/405467>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [August 2, 2023, 9:36am UTC](https://community.deeplearning.ai/t/help-assertionerror-first-required-coding-assignment/405467 "2023-08-02T09:36:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roee\_Ben\_Shoshan](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@Roee\_Ben\_Shoshan](https://community.deeplearning.ai/u/Roee_Ben_Shoshan)\
**Post date:** [August 2, 2023, 9:36am UTC](https://community.deeplearning.ai/t/help-assertionerror-first-required-coding-assignment/405467/1 "2023-08-02T09:36:28Z")

</div>

Hello everyone!  
im working on the first assignment and i suspect i have some bug that im not able to find.

When working on the ‘model’ function, I wrote the following code:

_{Moderator Edit: Solution Code Removed}_

(Important to say that so far all of my tests were successful)

And when I test this function I get an error saying:  
“Wrong values for d[‘w’].”

And it looks like only one of the values is not matching as it should:

[[0.14449502]  
[-0.1429235]  
[-0.19867517]  
[0.21265053]] != [[0.08639757]  
[-0.08231268]  
[-0.11798927]  
[0.12866053]]

Can please some one help?

Thank you!

---

<div class="post-metadata">

**Author:** ![saifkhanengr](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/saifkhanengr/32/152858_2.png) [@saifkhanengr](https://community.deeplearning.ai/u/saifkhanengr)\
**Post date:** [August 2, 2023, 10:03am UTC](https://community.deeplearning.ai/t/help-assertionerror-first-required-coding-assignment/405467/2 "2023-08-02T10:03:04Z")

</div>

Please note that sharing your code is not allowed by the community code of conduct. So, only share your full error (not code).

Regarding the issue, you are not passing the number of iterations and learning rate into the optimize function inside the model function. You have to specify these but do not hard-code them.

Best,  
Saif.

---

<div class="post-metadata">

**Author:** ![Roee\_Ben\_Shoshan](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@Roee\_Ben\_Shoshan](https://community.deeplearning.ai/u/Roee_Ben_Shoshan)\
**Post date:** [August 2, 2023, 10:05am UTC](https://community.deeplearning.ai/t/help-assertionerror-first-required-coding-assignment/405467/3 "2023-08-02T10:05:43Z")

</div>

Hello!  
First, sorry didnt know that.

Second, very helpful, thanks!
