Week 2 - Assignment Exercise 8-model error

Hello, I am getting this error for some reason and I cannot figure out if the mistake is in the model function, the propagate function or the optimize one… I passed all the tests previously and the calculations do seem correct.

If a mentor wants to see my notebook let me know.

If you passed the previous tests, then it is a good bet that the mistake is in model. You probably did not pass the correct arguments when you called optimize. E.g. are you sure that you passed the values for learning rate, number of iterations and did not “hard-code” them to the default values?

As a general matter, part of being a programmer is debugging your code. Nothing ever works right the first time, so you need to learn the skills to figure out what is wrong. When the answer is wrong, you can’t just give up and say “Hey, the code looks right to me”. That just means you aren’t thinking hard enough yet. :nerd_face:

1 Like

Oh wow, that was it. Thank you! I have a lot to learn!