W2_A2_Ex-8_passing incorrect arguments to optimize the model

Hello Everyone,
Could anyone please look out , what I am missing for this error

1 Like

You have hard-coded the number of iterations and perhaps the learning rate. They should not be a fixed value.

1 Like

Thank you , it worked but now I am facing the d[‘w’] issue

1 Like

I have used-
w=params[“w”]
b=params[“b”]

After calling optimise function

1 Like

It looks like you are still passing incorrect arguments to optimize when you call it from model.

Try putting this statement as the first statement in your model function to see what the values of the learning rate and number of iterations are being requested by the test case:

print(f"model: num_iterations {num_iterations} learning_rate {learning_rate}")

Then put this statement as the first line in optimize:

print(f"optimize: num_iterations {num_iterations} learning_rate {learning_rate}")

Now run the model_test cell and see what happens. Are they the same? If not, then you need to figure out how that happened.

2 Likes