Why isn't the loss of my neural network reduced after 2500 iterations?

I have developed a basic feedforward neural network from scratch to classify whether image is of cat or not cat. It works fine, but after 2500 iterations, my cost function is not reducing properly.

The loss function which I am using is

$$L(\hat{y},y) = -ylog\hat{y}-(1-y)log(1-\hat{y})$$

Can you please point out where I am going wrong the link to the notebook is https://www.kaggle.com/sidcodegladiator/catnoncat-nn?

• It might be the vanishing gradient problem. Jul 11 '20 at 17:45
• This isn't a cnn, it's a basic MLP and that it performs poorly isn't surprising. Dec 16 '20 at 6:49

You may try to adjust the learning rate first. As the learning rate has a great effect on changing the weights and the bias value.

See if the results has changed after adjusting the learning rate.

• I tried that as well, What do you suggest my learning rate should be? Jul 16 '20 at 8:13
• You can try to set the learning rate to 0.01 or 0.1 to see if the results of outcome is better or not Jul 16 '20 at 8:18
• I tried 0.01, 0.1 and even 1 what I have noticed is the rate at which the cost function is decreasing is good but the problem is it still getting plateaued at 0.64 after 2500 epochs Jul 16 '20 at 8:49

Since after a number of iterations the cost function is not reducing, this may be able to be diagnosed as a vanishing gradient problem. A solution to this is the use of a Residual neural network.