Search⌘ K
AI Features

Checkpoint

Explore how to navigate TensorFlow checkpoint directories to save and restore model parameters effectively. Understand the structure of checkpoint files, use tf.compat.v1.train.Saver to save and restore models, and manage model states for training, evaluation, and inference.

Chapter Goals:

  • Understand how the checkpoint directory is structured
  • Learn how to restore model parameters from a checkpoint

A. Checkpoint directory

After running training with a checkpoint directory, it will contain several files. An example checkpoint directory, named my_model, is shown below.

Shell
ls my_model

The .pbtxt file represents the entire computation graph stored in human readable text format. The .tfevents file is the events file for TensorBoard (note that the longer file suffix, which contains the local machine’s ID, is omitted).

The actual saved model state at a particular training step ...