W2_Ex-8_Model function

Hi,

I can’t pass the test case for model function in the assignment for week 2 since the length of the costs list is supposed to be 1. However, it just doesn’t make sense since the costs list store the cost of every 100 iteration. The correct number of length of that list should be 20 since we do 2000 iterations

Hi @Hoang_Bui!

Maybe you hard-coded the number of iteration while calling the optimize function inside the model function. That 2000 is set as the default value but the model test uses 50, not the default value. So, do not set the num_iterations equal to 2000. Same for learning_rate.

Best,
Saif.