Week 2 assignment error

Gradient at initial w, b (zeros): -1.108132775257732 -0.18136082474226803
Using X with shape (4, 1)

AssertionError Traceback (most recent call last)
in
6 print(‘Gradient at initial w, b (zeros):’, tmp_dj_dw, tmp_dj_db)
7
----> 8 compute_gradient_test(compute_gradient)

~/work/public_tests.py in compute_gradient_test(target)
60 dj_dw, dj_db = target(x, y, initial_w, initial_b)
61 #assert dj_dw.shape == initial_w.shape, f"Wrong shape for dj_dw. {dj_dw} != {initial_w.shape}"
—> 62 assert dj_db == -2, f"Case 1: dj_db is wrong: {dj_db} != -2"
63 assert np.allclose(dj_dw, -10.0), f"Case 1: dj_dw is wrong: {dj_dw} != -10.0"
64

AssertionError: Case 1: dj_db is wrong: -0.5 != -2

1 Like

Hello @vivek16pawar,

Do you mind dming me a copy of your notebook and I can take a look ?

Regards,

Mohamed

i also completed well the week2 assigment. My results coincide with the expected ones, however I obtained zero in this assignment. I would know wat I did wrong,
Please give me some answer about it

Hi I’m having similar trouble too,can I send you my notebook too?

Hello @Jesus_Suniaga,

Do you mind dming me your notebook and I can take a look ?

Regards,

Mohamed

Hello @Muhammed_sahal,

Yeah I’ve received your DM and I’ve provided some feedback regarding your assignment.

Let me know if you have any questions,

Mohamed

Hello @Jesus_Suniaga,

Not sure if you are aware, but you should not share your code publicly. Could you please remove this link and dm me a copy of your notebook and I can take a look.

Regards,

Mohamed

Thanks for the advise. I beg your pardon for my ignorance about it.
I have a question. What do You mean for a notebook.? I thought that a notebook may be colab notebook. Could You give me an example

1 Like

Open your notebook on coursera, click “File” > “Download as” > “notebook”. Then your notebook is downloaded. Click the profile of @mrafat, you will see a “Message” button, click the button to start drafting a message, attach your downloaded notebook to the message.

Thanks for the clarification @rmwkwok

1 Like

Ok . I did it. I apreciate your help soon, since the course finishs on August 15. Thanks a Lot
Sincerely tours
Jesús Suniaga

1 Like