From e6efd48f26a7cbe59039a7b26718ceacef5515c5 Mon Sep 17 00:00:00 2001 From: Vijay Vasudevan Date: Sat, 19 Mar 2016 09:28:38 -0800 Subject: 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 --- tensorflow/python/kernel_tests/depthtospace_op_test.py | 4 ++-- tensorflow/python/kernel_tests/spacetodepth_op_test.py | 4 ++-- 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. -- cgit v1.2.3