C1_W3_Exercise 3 Error

Here is what I got for Exercise 3, could you help with it? Thanks

1 Like

Hello Grace,

please refer this

If still having trouble, let me know.


Hi! Thanks for your response!
I followed the hint provided, but still got error. Can you take a look at it? Thanks!

are you still getting the same error?

Did you read the whole post, I mean the following comments??

Sending you one more hint link

probably your dj_db and dj_dw has some issue, please check this

I want you to try working on this error for while and solve by yourself.
I promise If you still do not get, I will look into the code. By the time, you can share your notebook via personal DM as we are not suppose to share graded cell code on public posts.


I’ve looked through it and still failed to find out what’s wrong with my codes. Actually I’ve spent quite a lot time on this Exercise before posting it for help. I’m sending you my notebook. Thank a lot!

No issues, send the notebook

Hello Grace,

Error 1: By any chance you tried copy and paste your code for graded cell 2 as
#Add b to z
z_wb=z_wb+b given in your notebook looks edited

In the updated notebook

Add the bias term to z_wb

    z_wb += b

This error is in the compute cost section

Error 2. Same goes for the compute gradient graded cell section
for j in range
the first one code was z_wb +=
but you added your line of code z_wb_ij (please remove that code line) and what code you mentioned for this line need to be added z_wb +=

Error 3. then for the next section after second z_wb, there is f_wb where in you recalled sigmoid function with z_wb which is creating the error.

For compute gradient section, compute code based on this image where I have highlighted with blue color

Error no 4. Note this is a single code line and not two line code, use hint section to correct this error which I have shared in the previous comment
for j in range(n):
dj_dw[j] =

Do these correction to pass all the tests.

All the best. Let me know once you have cleared the issue.


I’ve revised it and it’a all working now!!! Many thanks!!!

Happy to help!!

I know these assignment are very particular about the way implementations are done for grader to pass. It seems before update codes were not these way. Even when I was doing, I had got stuck and the mentor guiding me was telling me to do older way which was leading to grader error issue. But eventually with the help of hints given in the notebook help me crack the code. So it is important to maintain the grader cell just the way they are unless the start to end code are given blank.

Keep Learning!!!