aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples
diff options
context:
space:
mode:
authorGravatar Randy West <randywest55@gmail.com>2017-12-18 23:18:30 -0500
committerGravatar Randy West <randywest55@gmail.com>2017-12-18 23:18:30 -0500
commit3f18817317940253e6ec0e6b412492c5add5927b (patch)
treee1ede18679371c634cc921bc954c3da24df6184a /tensorflow/examples
parent2c858368c8c4b7e82c8d134786026a62a72d2676 (diff)
Fix basic arithmetic fail + make loop pythonic
Diffstat (limited to 'tensorflow/examples')
-rw-r--r--tensorflow/examples/tutorials/mnist/mnist_deep.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/examples/tutorials/mnist/mnist_deep.py b/tensorflow/examples/tutorials/mnist/mnist_deep.py
index 2699738735..47d2777813 100644
--- a/tensorflow/examples/tutorials/mnist/mnist_deep.py
+++ b/tensorflow/examples/tutorials/mnist/mnist_deep.py
@@ -168,7 +168,7 @@ def main(_):
# compute in batches to avoid OOM on GPUs
accuracy_l = []
- for i in range(50):
+ for _ in range(20):
batch = mnist.test.next_batch(500, shuffle=False)
accuracy_l.append(accuracy.eval(feed_dict={x: batch[0], y_: batch[1], keep_prob: 1.0}))
print('test accuracy %g' % numpy.mean(accuracy_l))