Can somebody please point out the error in my code


{moderator edit - solution code removed}

This is from the week 3 practice lab. I have been trying for over half an hour to figure out what’s wrong with my code but just can’t pinpoint it. Strange thing is, it seems to work for one part, but just refuses to work for the next one. Any insights would be highly appreciated.

Hi @IntelligentBanana ,

First, make sure that your sigmoid function is working properly. Then, you can try implementing the compute_gradient using vectorization. Your function looks fine to me!

Hope it helps!

1 Like

Please also check the parentheses on your invocation of sigmoid. I don’t think what you wrote matches what the math formula tells you to do there.

1 Like

Just a reminder: Please do not post your code on the forum. That’s not allowed by the Code of Conduct.

1 Like