aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/saver.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/training/saver.py')
-rw-r--r--tensorflow/python/training/saver.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/training/saver.py b/tensorflow/python/training/saver.py
index 8f142edb4b..5bf800a508 100644
--- a/tensorflow/python/training/saver.py
+++ b/tensorflow/python/training/saver.py
@@ -884,9 +884,9 @@ def latest_checkpoint(checkpoint_dir, latest_filename=None):
# Pick the latest checkpoint based on checkpoint state.
ckpt = get_checkpoint_state(checkpoint_dir, latest_filename)
if ckpt and ckpt.model_checkpoint_path:
- checkpoint_full_path = os.path.join(
+ checkpoint_pattern = os.path.join(
checkpoint_dir, ckpt.model_checkpoint_path)
- if gfile.Exists(checkpoint_full_path):
- return checkpoint_full_path
+ if gfile.Glob(checkpoint_pattern):
+ return checkpoint_pattern
return None