Cost is Not Decreasing Week-2 Programming Assignment

WhatsApp Image 2022-09-17 at 1.15.29 AM



Hi all,
I tried implementing the logistic regression with neural network mindset on dogs vs cats dataset. My cost is fluctuating between to values.
I understood the learning rate was higher. I decreased it. It was working properly but the rate of decrease of cost is pretty low. Like 0.01 decrease of 200 iters where my cost is around 2.6

please help. Thanks

Hi @Venkata_Giri ,

It looks like you have made a lot of changes to the template code. May I suggest you get a fresh copy of the assignment and read the implementation instruction and try again. Your code should record and print cost at every 100 examples, but you have changed that to 5. The code for updating previous cost is not needed, as the costs.append() is appending the calculated cost to ‘costs’.