Week2: Programming Assignment: Logistic Regression with a Neural Network Mindset EX8

I put previous blocks together and tried to implement the model but I got this error message below.

I guess this is because of iteration number? I’m not sure but I would like this problem , Please help me.
Best regards

Hi @Koyo_Fujii ,

Just to make sure that the correct parameters are passed to the calling function and don’t use hard coded values.

Exactly. That error means you did not use the value of “number of iterations” that was passed for the particular test case. You used a hard-coded or pre-defined value, instead of the actual value that was passed to model at the top level. Note that you can’t just “copy/paste” the definition of optimize as the call from model to optimize. Calling a function is a completely different thing than defining a function. If you are not familiar with how “named” parameters work in python, it would be good to look at some tutorials on that.

I could implement by fixing hard-coding, thank you so much Paulinpaloalto.