From 53cb2206193ef6b32655c328003b721b3ba80bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Mon, 27 Apr 2020 16:14:51 +0800 Subject: [PATCH] try to resolve the inference_pass_test, test=develop (#24192) --- .../ir/inference/inference_pass_test.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/ir/inference/inference_pass_test.py b/python/paddle/fluid/tests/unittests/ir/inference/inference_pass_test.py index b2a27f95886..0b8ea1f9392 100644 --- a/python/paddle/fluid/tests/unittests/ir/inference/inference_pass_test.py +++ b/python/paddle/fluid/tests/unittests/ir/inference/inference_pass_test.py @@ -29,19 +29,19 @@ from paddle.fluid.core import create_paddle_predictor class InferencePassTest(unittest.TestCase): - @classmethod - def setUpClass(cls): - cls.main_program = fluid.Program() - cls.startup_program = fluid.Program() - cls.feeds = None - cls.fetch_list = None - - cls.enable_mkldnn = False - cls.enable_trt = False - cls.trt_parameters = None - cls.enable_lite = False - cls.lite_parameters = None - cls.path = "./inference_pass/" + def __init__(self, methodName='runTest'): + super(InferencePassTest, self).__init__(methodName) + self.main_program = fluid.Program() + self.startup_program = fluid.Program() + self.feeds = None + self.fetch_list = None + + self.enable_mkldnn = False + self.enable_trt = False + self.trt_parameters = None + self.enable_lite = False + self.lite_parameters = None + self.path = "./inference_pass/" + self.__class__.__name__ + "/" np.random.seed(1) random.seed(1) -- GitLab