W2 - last assignment - optimization function

Does anyone know how to fix this error?
I haven’t changed anything about ‘grads’ in any part of the code, however this error shows up.

1 Like

Dear @Rosa_Adibrad,

Welcome to the Community.

Have you run the previous cell that contains the definition of ‘optimize’ function. that returns params, grads, costs?

Yes, in fact I had a slight mistake in ‘optimize’ function, however I was able to fix it.
Thank you very much :pray: