ModelCheckpoint
ModelCheckpoint is a Keras callback that saves model or weight states during training, optionally retaining the best state according to monitored performance.
Deep Learning with R, Third Edition
ModelCheckpoint is a Keras callback that saves model states during training, optionally retaining only the state with the best monitored performance.
- How it is used
- Uses a Keras callback during fit() to preserve model states and recover the best validation performance.
- How deep it goes
- Explains callback configuration and best-metric replacement through runnable examples, stopping short of callback implementation internals.
- Examples
- Demonstrates MNIST-style image tensors and a convolutional image classifier using val_loss, .keras files, and test evaluation.
- What you can do after
- Operate/configure it by selecting a filepath, monitored metric, and save-best-only policy, then reload the saved model for evaluation.
Read how Deep Learning with R, Third Edition explains ModelCheckpoint →
Deep Learning with Python, Third Edition
A Keras callback that saves a model or its best weights during training at specified points or when performance improves.
- How it is used
- Preserves the best validation-time model state so evaluation can avoid retraining after overfitting begins.
- How deep it goes
- Defines callback use and demonstrates filepath, monitoring, best-only saving, and reloading, but does not detail callback internals.
- Examples
- Uses an MNIST callback setup and a ConvNet image-classification run that reloads the saved model for test evaluation.
- What you can do after
- Operate/configure ModelCheckpoint through model.fit(), then reload the retained model for evaluation.
Read how Deep Learning with Python, Third Edition explains ModelCheckpoint →
Related concepts
- callbackkind of · A callback is a function or other callable supplied to software for invocation later in response to a specified event, condition, or point in execution.
- validation lossconfigures · The value of a loss function computed on held-out validation data to assess a model’s predictions.
- early stoppingused by · Early stopping is a technique that terminates an iterative process before its planned completion when a specified condition indicates that further work is unnecessary or unlikely to improve the objective.
- overfittingaddresses · Overfitting is a modeling condition in which a model fits patterns or idiosyncrasies in its training data too closely and consequently generalizes poorly to new data.
- checkpointingproduces · A checkpoint is a designated point in a process at which its state or progress is recorded or evaluated, often to support recovery, continuation, or control.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

