From 2690f7f0859958ef349d47a359c86e7d5d959d54 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Sun, 27 Sep 2020 17:49:12 +0000 Subject: [PATCH] change probs tolerance to 1e-4 --- python/paddle/fluid/tests/unittests/test_distribution.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_distribution.py b/python/paddle/fluid/tests/unittests/test_distribution.py index bfc128e85e9..7319d3ea388 100644 --- a/python/paddle/fluid/tests/unittests/test_distribution.py +++ b/python/paddle/fluid/tests/unittests/test_distribution.py @@ -408,7 +408,8 @@ class NormalTest(unittest.TestCase): entropy, np_entropy, rtol=tolerance, atol=tolerance) np.testing.assert_allclose( log_prob, np_lp, rtol=log_tolerance, atol=log_tolerance) - np.testing.assert_allclose(probs, np_p, rtol=tolerance, atol=tolerance) + np.testing.assert_allclose( + probs, np_p, rtol=log_tolerance, atol=log_tolerance) np.testing.assert_allclose(kl, np_kl, rtol=tolerance, atol=tolerance) def test_normal_distribution_dygraph(self, sample_shape=7, tolerance=1e-6): -- GitLab