Skip to content
masterclass Buddy

TensorFlow · Class

callbacks.ModelCheckpoint

ModelCheckpoint saves a Keras model or its weights during model.fit(). It can save every epoch or after a batch interval, and it can keep only the checkpoint with the best monitored value.

Last updated

Syntax

tf.keras.callbacks.ModelCheckpoint(filepath, monitor='val_loss', verbose=0, save_best_only=False, save_weights_only=False, mode='auto', save_freq='epoch', initial_value_threshold=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • tf.keras.callbacks.Callback
  • tf.keras.Model.fit
  • tf.keras.models.load_model
  • tf.keras.Model.load_weights
  • tf.keras.Model.save_weights

Source: tf.keras.callbacks.ModelCheckpoint | TensorFlow v2.21.0. Checked 2026-11-03.