aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2016-03-19 09:28:38 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-03-21 08:55:58 -0700
commite6efd48f26a7cbe59039a7b26718ceacef5515c5 (patch)
treed87159a6ff8865121ad864fae4d705ea725edc97
parent0ee2ce4182472f4af2b482cb6713afe20b2c9407 (diff)
TensorFlow: fix python3 by using range instead of xrange (range is fine
here since it's a test and the value is 10). Change: 117630192
-rw-r--r--tensorflow/python/kernel_tests/depthtospace_op_test.py4
-rw-r--r--tensorflow/python/kernel_tests/spacetodepth_op_test.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/python/kernel_tests/depthtospace_op_test.py b/tensorflow/python/kernel_tests/depthtospace_op_test.py
index bace61b40f..e9e66e0617 100644
--- a/tensorflow/python/kernel_tests/depthtospace_op_test.py
+++ b/tensorflow/python/kernel_tests/depthtospace_op_test.py
@@ -64,8 +64,8 @@ class DepthToSpaceTest(tf.test.TestCase):
[[9 * i], [10 * i], [13 * i], [14 * i]],
[[11 * i], [12 * i], [15 * i], [16 * i]]]
batch_size = 10
- x_np = [batch_input_elt(i) for i in xrange(batch_size)]
- x_out = [batch_output_elt(i) for i in xrange(batch_size)]
+ x_np = [batch_input_elt(i) for i in range(batch_size)]
+ x_out = [batch_output_elt(i) for i in range(batch_size)]
self._testOne(x_np, block_size, x_out)
# Tests for different width and height.
diff --git a/tensorflow/python/kernel_tests/spacetodepth_op_test.py b/tensorflow/python/kernel_tests/spacetodepth_op_test.py
index 02ebdce768..88e650840e 100644
--- a/tensorflow/python/kernel_tests/spacetodepth_op_test.py
+++ b/tensorflow/python/kernel_tests/spacetodepth_op_test.py
@@ -109,8 +109,8 @@ class SpaceToDepthTest(tf.test.TestCase):
[[9 * i, 10 * i, 11 * i, 12 * i],
[13 * i, 14 * i, 15 * i, 16 * i]]]
batch_size = 10
- x_np = [batch_input_elt(i) for i in xrange(batch_size)]
- x_out = [batch_output_elt(i) for i in xrange(batch_size)]
+ x_np = [batch_input_elt(i) for i in range(batch_size)]
+ x_out = [batch_output_elt(i) for i in range(batch_size)]
self._testOne(x_np, block_size, x_out)
# Tests for different width and height.