tf.compat.v1.train.checkpoint_exists

View source on GitHub

Checks whether a V1 or V2 checkpoint exists with the specified prefix. (deprecated)

tf.compat.v1.train.checkpoint_exists(
    checkpoint_prefix
)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix.

This is the recommended way to check if a checkpoint exists, since it takes into account the naming difference between V1 and V2 formats.

Args:

Returns:

A bool, true if a checkpoint referred to by checkpoint_prefix exists.