From 2fb1fc0dae58f3897f8dd96ac427c4e21e77c653 Mon Sep 17 00:00:00 2001 From: Zhou Wei <1183042833@qq.com> Date: Wed, 29 Dec 2021 18:53:55 +0800 Subject: [PATCH] fix random OP failed (#38564) --- python/paddle/fluid/tests/unittests/test_exponential_op.py | 1 + python/paddle/fluid/tests/unittests/test_poisson_op.py | 1 + 2 files changed, 2 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/test_exponential_op.py b/python/paddle/fluid/tests/unittests/test_exponential_op.py index c5833a05c2..7d43ebadf4 100644 --- a/python/paddle/fluid/tests/unittests/test_exponential_op.py +++ b/python/paddle/fluid/tests/unittests/test_exponential_op.py @@ -18,6 +18,7 @@ import numpy as np from op_test import OpTest paddle.enable_static() +paddle.seed(100) class TestExponentialOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_poisson_op.py b/python/paddle/fluid/tests/unittests/test_poisson_op.py index 854aaf8854..dc4dc3284e 100644 --- a/python/paddle/fluid/tests/unittests/test_poisson_op.py +++ b/python/paddle/fluid/tests/unittests/test_poisson_op.py @@ -19,6 +19,7 @@ from op_test import OpTest import math paddle.enable_static() +paddle.seed(100) def output_hist(out, lam, a, b): -- GitLab