W2_A2_Ex- 6_Optimize

I was wrong to trust you :sob: :sob: :sob:
Your update rule is not correct. Check for the b.

1 Like

:blush:

Ok, I looked at this so many times, that at the end I got blind… Sorry for the bother, all good!

1 Like


Hello, I have a same problem to the above, problem with value and data type of cost, in ex5 there is no problem, update values ​​are w = w - learning rate * dw and same with b. Can someone help me?

Notice that your second cost value after 100 iterations is actually larger than the first one, not smaller. Are you sure that you’re not adding instead of subtracting when you do the “update parameters” logic? Or that you’re somehow over-riding the learning rate value?

1 Like

haha, i’m sorry, w update is correct but b is wrong, it’s missing d. i didn’t check carefully, thanks for your time

1 Like

Yes, I was going to say that the code might look right at first glance, but programming is always a game of details. A single character missing or in the wrong place can ruin everything! :scream_cat: Glad to hear you found the issue!

1 Like