From 0094e5fa0459f44c56fe32459b62294d908172f8 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Mon, 28 Sep 2020 00:29:39 +0000 Subject: [PATCH] change tolerance of Normal kl method --- 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 7319d3ea388..40611fed652 100644 --- a/python/paddle/fluid/tests/unittests/test_distribution.py +++ b/python/paddle/fluid/tests/unittests/test_distribution.py @@ -410,7 +410,8 @@ class NormalTest(unittest.TestCase): log_prob, np_lp, rtol=log_tolerance, atol=log_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) + np.testing.assert_allclose( + kl, np_kl, rtol=log_tolerance, atol=log_tolerance) def test_normal_distribution_dygraph(self, sample_shape=7, tolerance=1e-6): paddle.disable_static(self.place) -- GitLab