# Keras EarlyStopping callback: Why would I ever set restore_best_weights=False?

The point of EarlyStopping is to stop training at a point where validation loss (or some other metric) does not improve.

If I have set EarlyStopping(patience=10, restore_best_weights=False), Keras will return the model trained for 10 extra epochs after val_loss reached a minimum. Why would I ever want this? Has this model not just trained for 10 unnecessary epochs? Wouldn't it make more sense to give me back the model that was trained at the lowest validation loss i.e. with restore_best_weights=True?

Would love to hear situations where doing those extra 10 epochs of training is better than not doing them.

• – WBM
Apr 12, 2021 at 13:29
• Great thanks! It looks like this is the default behavior to save memory. Though, there seem to be no arguments for restore_best_weights=False other than that. Apr 13, 2021 at 10:25

The default value is restore_best_weights=False.
Despite the default value, I would say that, if you have no problem in keeping another copy of the model in memory (i.e. because it is a huge model), the most sensible value is restore_best_weights=True.