# tf.train.load_checkpoint

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/train/load_checkpoint) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/training/checkpoint_utils.py#L45-L67) |

Returns `CheckpointReader` for checkpoint found in `ckpt_dir_or_file`.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.train.load_checkpoint`](https://www.tensorflow.org/api_docs/python/tf/train/load_checkpoint)

<br />

    tf.train.load_checkpoint(
        ckpt_dir_or_file
    )

If `ckpt_dir_or_file` resolves to a directory with multiple checkpoints,
reader for the latest checkpoint is returned.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `ckpt_dir_or_file` | Directory with checkpoints file or path to checkpoint file. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `CheckpointReader` object. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If `ckpt_dir_or_file` resolves to a directory with no checkpoints. |

<br />