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
checkpoint_prefix
the prefix of a V1 or V2 checkpoint, with V2 taking
priority. Typically the result of Saver.save() or that of
tf.train.latest_checkpoint(), regardless of sharded/non-sharded or
V1/V2.
Returns
A bool, true if a checkpoint referred to by checkpoint_prefix exists.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.train.checkpoint_exists\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/training/checkpoint_management.py#L374-L393) |\n\nChecks whether a V1 or V2 checkpoint exists with the specified prefix. (deprecated)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.train.checkpoint_exists`](/api_docs/python/tf/compat/v1/train/checkpoint_exists)\n\n\u003cbr /\u003e\n\n tf.train.checkpoint_exists(\n checkpoint_prefix\n )\n\n| **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.\n\nThis is the recommended way to check if a checkpoint exists, since it takes\ninto account the naming difference between V1 and V2 formats.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `checkpoint_prefix` | the prefix of a V1 or V2 checkpoint, with V2 taking priority. Typically the result of [`Saver.save()`](../../tf/train/Saver#save) or that of [`tf.train.latest_checkpoint()`](../../tf/train/latest_checkpoint), regardless of sharded/non-sharded or V1/V2. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A bool, true if a checkpoint referred to by `checkpoint_prefix` exists. ||\n\n\u003cbr /\u003e"]]