From e92ad8a2097ecffdfa412306b60dba4df68b8541 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Tue, 5 Mar 2019 16:56:56 +0800 Subject: [PATCH] optimize test_async_ssa_graph_executor_mnist test=develop --- .../tests/unittests/test_async_ssa_graph_executor_mnist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_async_ssa_graph_executor_mnist.py b/python/paddle/fluid/tests/unittests/test_async_ssa_graph_executor_mnist.py index 4fbda407f1..5e77ce9b81 100644 --- a/python/paddle/fluid/tests/unittests/test_async_ssa_graph_executor_mnist.py +++ b/python/paddle/fluid/tests/unittests/test_async_ssa_graph_executor_mnist.py @@ -178,8 +178,8 @@ class TestAsyncSSAGraphExecutor(unittest.TestCase): main_program=fluid.Program(), startup_program=fluid.Program()): test() - assert int(step_list[0] / 2) == int(step_list[1]) - assert int(step_list[1] / 2) == int(step_list[2]) + assert abs(int(step_list[0] / 2) - int(step_list[1])) < 5 + assert abs(int(step_list[1] / 2) - int(step_list[2])) < 5 if __name__ == "__main__": -- GitLab