Reputation: 65
I'm using keras(tensorflow) to train my own CNN model. As shown in the chart, the train_loss goes down well, but val_loss has big change among each Epoch. What can be the reason, and what should I do to improve it?
Upvotes: 2
Views: 847
Reputation: 1694
This is typical behavior when training in deep learning. Think about it, your target loss is the training loss, so it is directly affected by the training process and as you said "goes down well". The validation loss is only affected indirectly, so naturally it will be more volatile in comparison.
When you are training, the model is attempting to estimate the real distribution of the data, however all it got is the distribution of the training dataset to rely on (which is similar but not the same).
The big spike at the end of your loss curve might be the result of over-fitting. If you are not using a decaying learning rate during training, I would suggest it.
Upvotes: 2