aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
authorGravatar Zongheng Yang <zongheng@google.com>2016-10-16 08:05:45 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-10-16 09:20:23 -0700
commitac2cc615a4c6744a79af478c5502d72a38e971ce (patch)
tree165d0e9b6af80da8cc2cb93ec0928bfbc9026b11 /tensorflow
parent1219491acd423920fd8151e52fe43c1c599e1db8 (diff)
Change for internal compatibility.
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/python/tools/freeze_graph_test.py2
-rw-r--r--tensorflow/python/training/monitored_session.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/python/tools/freeze_graph_test.py b/tensorflow/python/tools/freeze_graph_test.py
index 47c98a2d9c..cc4eaa95b3 100644
--- a/tensorflow/python/tools/freeze_graph_test.py
+++ b/tensorflow/python/tools/freeze_graph_test.py
@@ -44,7 +44,7 @@ class FreezeGraphTest(test_util.TensorFlowTestCase):
sess.run(init)
output = sess.run(output_node)
self.assertNear(2.0, output, 0.00001)
- saver = tf.train.Saver()
+ saver = tf.train.Saver(write_version=tf.train.SaverDef.V1)
saver.save(sess, checkpoint_prefix, global_step=0,
latest_filename=checkpoint_state_name)
tf.train.write_graph(sess.graph, self.get_temp_dir(), input_graph_name)
diff --git a/tensorflow/python/training/monitored_session.py b/tensorflow/python/training/monitored_session.py
index 678df46cf5..55c4f3138e 100644
--- a/tensorflow/python/training/monitored_session.py
+++ b/tensorflow/python/training/monitored_session.py
@@ -21,6 +21,7 @@ from __future__ import print_function
import abc
+from tensorflow.core.protobuf import saver_pb2
from tensorflow.python.framework import errors
from tensorflow.python.framework import ops
from tensorflow.python.ops import control_flow_ops
@@ -142,7 +143,8 @@ class Scaffold(object):
self._saver = Scaffold.get_or_default(
'saver',
ops.GraphKeys.SAVERS,
- lambda: training_saver.Saver(sharded=True, allow_empty=True))
+ lambda: training_saver.Saver(sharded=True, allow_empty=True,
+ write_version=saver_pb2.SaverDef.V1))
# pylint: enable=g-long-lambda
self._saver.build()