From 64b4612290bad37c9535ce31b0bc22ca2d8d637b Mon Sep 17 00:00:00 2001 From: littletomatodonkey <2120160898@bit.edu.cn> Date: Sun, 5 Jul 2020 23:48:10 +0800 Subject: [PATCH] Fix softmax unittest (#25371) * test=develop, fix softmax --- python/paddle/fluid/tests/unittests/test_softmax_op.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/tests/unittests/test_softmax_op.py b/python/paddle/fluid/tests/unittests/test_softmax_op.py index c393b55d7bd..c00ad536656 100644 --- a/python/paddle/fluid/tests/unittests/test_softmax_op.py +++ b/python/paddle/fluid/tests/unittests/test_softmax_op.py @@ -47,6 +47,7 @@ class TestSoftmaxOp(OpTest): self.shape = self.get_x_shape() self.axis = self.get_axis() + np.random.seed(0) x = np.random.uniform(0.1, 1, self.shape).astype(self.dtype) out = np.apply_along_axis(stable_softmax, self.axis, x) -- GitLab