From ccd2d06a2207a2d570af603dc25e0bb7c7702651 Mon Sep 17 00:00:00 2001 From: xiaoting <31891223+tink2123@users.noreply.github.com> Date: Thu, 23 Apr 2020 16:02:57 +0800 Subject: [PATCH] fix tribilinear unitest, test=release/2.0 (#24081) * fix tribilinear unitest, test=release/2.0 * add random seed,test=release/2.0 --- python/paddle/fluid/tests/unittests/test_bicubic_interp_op.py | 4 ++-- .../paddle/fluid/tests/unittests/test_trilinear_interp_op.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_bicubic_interp_op.py b/python/paddle/fluid/tests/unittests/test_bicubic_interp_op.py index a044e04f502..616f9c5a392 100644 --- a/python/paddle/fluid/tests/unittests/test_bicubic_interp_op.py +++ b/python/paddle/fluid/tests/unittests/test_bicubic_interp_op.py @@ -21,7 +21,7 @@ import paddle.fluid.core as core import paddle.fluid as fluid import paddle from paddle.fluid import Program, program_guard -from paddle.nn.functional import * +from paddle.nn.functional import interpolate def cubic_1(x, a): @@ -265,7 +265,7 @@ class TestBicubicInterpDataLayout(TestBicubicInterpOp): class TestBicubicInterpOpAPI(unittest.TestCase): def test_case(self): - + np.random.seed(200) x_data = np.random.random((2, 3, 6, 6)).astype("float32") dim_data = np.array([12]).astype("int32") shape_data = np.array([12, 12]).astype("int32") diff --git a/python/paddle/fluid/tests/unittests/test_trilinear_interp_op.py b/python/paddle/fluid/tests/unittests/test_trilinear_interp_op.py index e27f5d3a270..a9c7049ca62 100755 --- a/python/paddle/fluid/tests/unittests/test_trilinear_interp_op.py +++ b/python/paddle/fluid/tests/unittests/test_trilinear_interp_op.py @@ -19,7 +19,7 @@ import numpy as np from op_test import OpTest import paddle.fluid.core as core import paddle.fluid as fluid -from paddle.nn.functional import * +from paddle.nn.functional import interpolate def trilinear_interp_np(input, -- GitLab