aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/tutorials/mnist/fully_connected_feed.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/examples/tutorials/mnist/fully_connected_feed.py')
-rw-r--r--tensorflow/examples/tutorials/mnist/fully_connected_feed.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/examples/tutorials/mnist/fully_connected_feed.py b/tensorflow/examples/tutorials/mnist/fully_connected_feed.py
index fbf4000e8f..be50f4529f 100644
--- a/tensorflow/examples/tutorials/mnist/fully_connected_feed.py
+++ b/tensorflow/examples/tutorials/mnist/fully_connected_feed.py
@@ -108,7 +108,7 @@ def do_eval(sess,
images_placeholder,
labels_placeholder)
true_count += sess.run(eval_correct, feed_dict=feed_dict)
- precision = true_count / num_examples
+ precision = float(true_count) / num_examples
print(' Num examples: %d Num correct: %d Precision @ 1: %0.04f' %
(num_examples, true_count, precision))
@@ -146,7 +146,7 @@ def run_training():
init = tf.global_variables_initializer()
# Create a saver for writing training checkpoints.
- saver = tf.train.Saver(write_version=tf.train.SaverDef.V2)
+ saver = tf.train.Saver()
# Create a session for running Ops on the Graph.
sess = tf.Session()