aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/models/image/cifar10/cifar10_eval.py
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 18:45:21 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 18:45:21 -0800
commitf2102f4e2c1c87f1d1bf9ab856a2849c54478760 (patch)
tree54ffdbb4081d6e75d4e626682ea9c70e6866599b /tensorflow/models/image/cifar10/cifar10_eval.py
parent3961abed9560cd852fff4add393b451483bbc3af (diff)
TensorFlow: upstream changes from the afternoon.
Changes: - futurize --stage2 changes for Python 3 compatibility by @girving. - Small updates to documentation by @vrv, schuster and others - Account for failure of std::thread::hardware_concurrency by @ebrevdo. - More changes for backwards-compatibility tests by Josh - Updates to python op doc generation by Josh - Added support for using the best-fit allocator via ConfigProto by @vrv. - Rename LocalSession to DirectSession, since local was a bad name for it. - Enable tf.nn.moments() to work with tensors of unknown shape by @mrry. GITHUB_ISSUE: 139 - Changes for Android build by Andrew. Base CL: 107645181
Diffstat (limited to 'tensorflow/models/image/cifar10/cifar10_eval.py')
-rw-r--r--tensorflow/models/image/cifar10/cifar10_eval.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/models/image/cifar10/cifar10_eval.py b/tensorflow/models/image/cifar10/cifar10_eval.py
index c8e6ec067f..789cf5e9d3 100644
--- a/tensorflow/models/image/cifar10/cifar10_eval.py
+++ b/tensorflow/models/image/cifar10/cifar10_eval.py
@@ -15,7 +15,10 @@ data set, compile the program and train the model.
http://tensorflow.org/tutorials/deep_cnn/
"""
+from __future__ import absolute_import
+from __future__ import division
from __future__ import print_function
+
from datetime import datetime
import math
import time
@@ -83,7 +86,7 @@ def eval_once(saver, summary_writer, top_k_op, summary_op):
step += 1
# Compute precision @ 1.
- precision = float(true_count) / float(total_sample_count)
+ precision = true_count / total_sample_count
print('%s: precision @ 1 = %.3f' % (datetime.now(), precision))
summary = tf.Summary()