From 99707b281dbc709f39a51aba7c0e22a143ba8a08 Mon Sep 17 00:00:00 2001 From: barrierye Date: Mon, 29 Oct 2018 15:37:56 +0800 Subject: [PATCH] change / to // to fit py3 --- .../fluid/tests/unittests/test_similarity_focus_op.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_similarity_focus_op.py b/python/paddle/fluid/tests/unittests/test_similarity_focus_op.py index 7df9fe3a48..bd3b2782ae 100755 --- a/python/paddle/fluid/tests/unittests/test_similarity_focus_op.py +++ b/python/paddle/fluid/tests/unittests/test_similarity_focus_op.py @@ -47,7 +47,7 @@ class TestSimilarityFocusOp(OpTest): cnt = 0 for i in range(channel.size): index = channel.argmax() - idx1 = index / z_dim + idx1 = index // z_dim idx2 = index % z_dim if tag1[idx1] + tag2[idx2] == 0: tag1[idx1] = 1 @@ -95,7 +95,7 @@ class TestSimilarityFocusOp_axis1(OpTest): cnt = 0 for i in range(channel.size): index = channel.argmax() - idx1 = index / z_dim + idx1 = index // z_dim idx2 = index % z_dim if tag1[idx1] + tag2[idx2] == 0: tag1[idx1] = 1 @@ -143,7 +143,7 @@ class TestSimilarityFocusOp_axis2(OpTest): cnt = 0 for i in range(channel.size): index = channel.argmax() - idx1 = index / z_dim + idx1 = index // z_dim idx2 = index % z_dim if tag1[idx1] + tag2[idx2] == 0: tag1[idx1] = 1 @@ -191,7 +191,7 @@ class TestSimilarityFocusOp_axis3(OpTest): cnt = 0 for i in range(channel.size): index = channel.argmax() - idx1 = index / y_dim + idx1 = index // y_dim idx2 = index % y_dim if tag1[idx1] + tag2[idx2] == 0: tag1[idx1] = 1 -- GitLab