From 8cc20365f748e9cada5d4a8ef25732eb15281b28 Mon Sep 17 00:00:00 2001 From: Abdullah Selek Date: Thu, 4 Jul 2019 09:09:33 +0100 Subject: [PATCH] Fix sanity errors. --- tensorflow/python/training/saver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/training/saver.py b/tensorflow/python/training/saver.py index 4a30e667be9..d65297fb30d 100644 --- a/tensorflow/python/training/saver.py +++ b/tensorflow/python/training/saver.py @@ -1276,11 +1276,12 @@ class Saver(object): if save_path is None: raise ValueError("Can't load save_path when it is None.") - if not checkpoint_management.checkpoint_exists_internal(compat.as_text(save_path)): + checkpoint_prefix = compat.as_text(save_path) + if not checkpoint_management.checkpoint_exists_internal(checkpoint_prefix): raise ValueError("The passed save_path is not a valid checkpoint: " + - compat.as_text(save_path)) + checkpoint_prefix) - logging.info("Restoring parameters from %s", compat.as_text(save_path)) + logging.info("Restoring parameters from %s", checkpoint_prefix) try: if context.executing_eagerly(): self._build_eager(save_path, build_save=False, build_restore=True)