Week 3 assignment problem

Hey @Sudipta_Mukherjee1,
You do realize that it’s not even an hour since you posted your doubt in the public forums. Please don’t go about starting to DM mentors. Please do realize that the mentors at DeepLearning.AI are volunteers, we are not paid to help. The mentors try to reply as soon as possible, but they have their full-time jobs or some of them are full-time students like me.

Now, coming to your query, your code has indentation issues. Simply adding print statements to your code can help you to realize that your code is not computing the gradients as per the formulation. If you are uncomfortable with indentation in python, please check out 07 of this thread, and if you are new to Python, then check out 03 of the same thread.

If print statements are something you don’t like, you may also use a pen and a paper, and try to see what your code is actually computing. I hope this helps.

Lastly, if I am not wrong, I conveyed to you previously before as well. Let me convey it again. Posting code in the public forums is strictly against the community guidelines. If a mentor needs to take a look at your code, (s)he will ask you to DM it. You are always welcome to post the traceback of your error.


1 Like