DLS Week 2 Ex 8. Model error

I get the error:

there is also this thread, but I actually defined the sigmoid function correctly:
Week 2 Logistic Regression Assignment, Ex 8. Wrong values for d - Deep Learning Specialization / DLS Course 1 - DeepLearning.AI

I think the problem is in the definition of the w, b with the " initialize_with_zeros( )" function. I defined the row to be X_train.shape[0]…
or maybe the error is after…
I used the same parameters given in the function to define Y_prediction_test and Y_prediction_train, I’m not sure what I could have done wrong.
Thank you for your help!

The most likely place to look for the error is the arguments you are passing when you call the optimize function from model. Did you pass the learning rate, number of iterations and print flag? If so, are you sure you did not “hard-code” the values that you passed?

Hello @ paulinpaloalto
thank you very much for your reply. The issue was indeed in the parameters of the optimize function. I have some experience in programming, but not much, and this kind of details escape me from time to time. As you said, I had “hard-coded” the values I passed

It’s great to hear that you were able to find the solution based on just my hint about where to look. Thanks for confirming.