W2 - Optimization Methods

I am getting this error on the “update parameters with adam” function:

File “”, line 90
parameters[“W” + str(l+1)] = parameters[“W” + str(l+1)] - learning_rate * v_corrected[“dW” + str(l+1)] / (np.sqrt(s_corrected[“dW” + str(l+1)]) + epsilon)
^
SyntaxError: invalid syntax

This is the section of code the error is referring to:

{moderator edit - solution code removed}

could someone help explain the error please?

Posting code is not allowed. Please remove it.

The code you show looks correct to me. When this happens, it usually means you are looking for the error in the wrong place: there must be a previous line that is missing a closing delimiter. The notebook editor is syntax aware: click on a paren or bracket and it will highlight the matching one. Or not :scream_cat:

ok I will take it down. But can I get you to look into my profile to help me?

Click on my profile and send me a screenshot of the code via DM.

Thanks Mujassim_Jamal! that solved it. Brilliant man :grin: