There isn't a single answerIf your model is still improving (according to this questionthe validation loss), although I will say that 400 sounds quite highthen more epochs are better. You can confirm this by using a hold-out test set to mecompare model checkpoints e. Don't forget, ang. at epoch is defined as one iteration through100, 200, 400, 500.
Normally the complete training setamount of improvement reduces with time (see note about over-fitting below"diminishing returns"), so it is common to stop once the curves is pretty-much flat, for example using EarlyStopping callback.
Different model requires different times to trains, depending on their size/architecture, and the dateset. Some examples of large models being trained on the ImageNet dataset (~1,000,000 labelled images of ~1000 classes):
- the original YOLO model trained in 160 epochs
- the ResNet model can be trained in 35 epoch
- fully-conneted DenseNet model trained in 300 epochs
The number of epochs you require will depend on the size of your model and the variation in your dataset.
The size of your model can be a rough proxy for the complexity that it is able to express (or learn). So a huge model can represent produce more nuanced models for datasets with higher diversity in the data, however would probably take longer to train i.e. more epochs.
Whilst training, I would recommend plotting the training and validation loss and keeping an eye on how they progress over epochs and also in relation to one another. You should of course expect both values to decrease, but you need to stop training once the lines start diverging - meaning that you are over-fitting to your specific dataset.
That is likely to happen if you train a large CNN for many epochs, and the graph could look something like this: