# Module: tf.train

<br />

Support for training models.

See the [Training](https://tensorflow.org/api_guides/python/train) guide.

## Modules

[`experimental`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/experimental) module: Public API for tf.train.experimental namespace.

## Classes

[`class BytesList`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/BytesList): Container that holds repeated fundamental values of byte type in the [`tf.train.Feature`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Feature) message.

[`class Checkpoint`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Checkpoint): Manages saving/restoring trackable values to disk.

[`class CheckpointManager`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/CheckpointManager): Manages multiple checkpoints by keeping some and deleting unneeded ones.

[`class CheckpointOptions`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/CheckpointOptions): Options for constructing a Checkpoint.

[`class ClusterDef`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/ClusterDef): A ProtocolMessage

[`class ClusterSpec`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/ClusterSpec): Represents a cluster as a set of "tasks", organized into "jobs".

[`class Coordinator`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Coordinator): A coordinator for threads.

[`class Example`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Example): An `Example` is a mostly-normalized data format for storing data for training and inference.

[`class ExponentialMovingAverage`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/ExponentialMovingAverage): Maintains moving averages of variables by employing an exponential decay.

[`class Feature`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Feature): A `Feature` is a list which may hold zero or more values.

[`class FeatureList`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/FeatureList): Contains zero or more values of [`tf.train.Feature`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Feature)s.

[`class FeatureLists`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/FeatureLists): Contains the mapping from name to [`tf.train.FeatureList`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/FeatureList).

[`class Features`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Features): Protocol message for describing the `features` of a [`tf.train.Example`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Example).

[`class FloatList`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/FloatList): Container that holds repeated fundamental values of float type in the [`tf.train.Feature`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Feature) message.

[`class Int64List`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Int64List): Container that holds repeated fundamental value of int64 type in the [`tf.train.Feature`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/Feature) message.

[`class JobDef`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/JobDef): A ProtocolMessage

[`class SequenceExample`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/SequenceExample): A `SequenceExample` is a format for representing one or more sequences and some context.

[`class ServerDef`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/ServerDef): A ProtocolMessage

## Functions

[`checkpoints_iterator(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/checkpoints_iterator): Continuously yield new checkpoint files as they appear.

[`get_checkpoint_state(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/get_checkpoint_state): Returns CheckpointState proto from the "checkpoint" file.

[`latest_checkpoint(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/latest_checkpoint): Finds the filename of latest saved checkpoint file.

[`list_variables(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/list_variables): Lists the checkpoint keys and shapes of variables in a checkpoint.

[`load_checkpoint(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/load_checkpoint): Returns `CheckpointReader` for checkpoint found in `ckpt_dir_or_file`.

[`load_variable(...)`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/train/load_variable): Returns the tensor value of the given variable in the checkpoint.