diff options
author | Allen Lavoie <allenl@google.com> | 2018-08-02 15:47:43 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-02 15:51:17 -0700 |
commit | 1bf206bc82f600886f1e19c9860f09f18984346b (patch) | |
tree | fbd6ee10df16e491142017e96120181b81a72ec5 /tensorflow/python/tools | |
parent | 6fbbad97e293cc39bde32495e92614c69a9a7896 (diff) |
Split checkpoint management utility functions out of saver.py
Pure refactor, in preparation for adding a higher level checkpoint management utility. This utility will also need to work with the Checkpoint proto, and globbing it on to saver.py seems dirty.
PiperOrigin-RevId: 207179646
Diffstat (limited to 'tensorflow/python/tools')
-rw-r--r-- | tensorflow/python/tools/freeze_graph.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/python/tools/freeze_graph.py b/tensorflow/python/tools/freeze_graph.py index 4349699a94..130fe70beb 100644 --- a/tensorflow/python/tools/freeze_graph.py +++ b/tensorflow/python/tools/freeze_graph.py @@ -55,6 +55,7 @@ from tensorflow.python.platform import gfile from tensorflow.python.saved_model import loader from tensorflow.python.saved_model import tag_constants from tensorflow.python.tools import saved_model_utils +from tensorflow.python.training import checkpoint_management from tensorflow.python.training import saver as saver_lib @@ -78,7 +79,7 @@ def freeze_graph_with_def_protos(input_graph_def, # 'input_checkpoint' may be a prefix if we're using Saver V2 format if (not input_saved_model_dir and - not saver_lib.checkpoint_exists(input_checkpoint)): + not checkpoint_management.checkpoint_exists(input_checkpoint)): print("Input checkpoint '" + input_checkpoint + "' doesn't exist!") return -1 |