Your problem is with the compute_cost function you must be doing something wrong there, try to revise it and check of the outputs are correct.

Your code must work correct for any initial values of w and b.

Not just when they’re zeros.

Getting the expected results with zeros doesn’t prove very much, since zero times anything will still be zero. That can hide a lot of errors.

1 Like

Okay, thank you for the insight.