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 2024-04-26 UTC."],[],[],null,["# tf.compat.v1.train.checkpoint_exists\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/checkpoint/checkpoint_management.py#L392-L411) |\n\nChecks whether a V1 or V2 checkpoint exists with the specified prefix. (deprecated) \n\n tf.compat.v1.train.checkpoint_exists(\n checkpoint_prefix\n )\n\n| **Deprecated:** 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()` 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"]]