Ex-4.3 week2

Error finding dw . plz suggest me

Hi @DEVANSH_RAJ,

Please share the error message with us. Share the screenshot of it, preferably.

Thanks,
Mubsi

2 Likes

invalid syntax putting dw=(np.sum(np.dot(X,((A-Y).T))/m

Hello,

Your this code is incorrect

Please do the correction according to the below image
Screenshot 1945-06-22 at 12.51.52 PM 1

Follow the correct NumPy for this code.

Regards
DP

1 Like

That type of syntax error means that you have mismatching parentheses on the previous line. Note that the editor is syntax aware: click on a paren or bracket and it will highlight the matching one. Or not :scream_cat:

So the moral of the story is that if you can’t find the cause of the syntax error, that just means you are looking in the wrong place. :grinning:

1 Like

corrected bracket now getting the following error:

z is not defined

Devansh,

Can you please refer the instructions given just above these grader cells. Actually those instructions do help you to write the code. What is z mentioned as per the instructions given before the grader cell??

Also you do not require to tuple w.T and X, read the instructions above for this code line. You will find the correct codes.

Also once you do the correction for your activation code, you will get error log for cost as that code is also incorrect.

The below image is from instructions which will help you do corrections to both the codes.

Let me know if you still don’t understand. I hope you have some idea about python as this will help you in this course. If not do try different courses available on Coursera related to Python and Data Science.

Regards
DP

we donot require to dot w Transpose nd X ??

madam i hv done python course !

You need to do but you do not need that extra bracket between w and X.

Did you understand what you need to replace z with??? Did the instructions help you understand.

That’s good Devansh :slight_smile:

What I meant by doing python course is related to Data science as it help you understand better about applying various functionalities.

Hope you are taking this positively :slight_smile:

Regards
DP

understood thannx a lot