- Early stopping: stop the training when a condition is met
- Checkpoint : frequently save the model
The purpose of Early Stopping is to avoid overfitting by stopping the model before it happens using a defined condition. If you use it, and then you save the model when the training is stopped*, you will get a model that is assumed to be good enough and not overfitted.
The purpose of the class
ModelCheckpoint is to save models several times while training. This can be useful to find at which epoch the model gets the best performance. So, if you use it, you will get several models that are saved at different epochs (or, more generally, "checkpoints").
Even after using both methods, you will get some models, but they have a different purpose. None of them is better than the other. I almost always use both methods at the same time. You can use early stopping to stop the training and save a lot of models while training using
ModelCheckpoint. In most of my cases, the best model is around the epoch during early stopping.
*note: the model saving process is not done by