liveBook · Manning

ModelCheckpoint

ModelCheckpoint is a Keras callback that saves model or weight states during training, optionally retaining the best state according to monitored performance.

How 2 Manning books explain it

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

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.