From dd21ae6c1ee3b681bfd069760448fead207964ee Mon Sep 17 00:00:00 2001 From: typhoonzero Date: Wed, 27 Dec 2017 09:58:51 +0800 Subject: [PATCH] update --- python/paddle/v2/fluid/tests/test_adam_op.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/fluid/tests/test_adam_op.py b/python/paddle/v2/fluid/tests/test_adam_op.py index 996fcfe49d0..3758ca457e5 100644 --- a/python/paddle/v2/fluid/tests/test_adam_op.py +++ b/python/paddle/v2/fluid/tests/test_adam_op.py @@ -285,8 +285,9 @@ class TestSparseAdamOp(unittest.TestCase): j = 0 while j < self.row_numel: pos = row_id * self.row_numel + j - print (actual[pos] - np_array[pos]) / actual[pos] - self.assertLess((actual[pos] - np_array[pos]) / actual[pos], 0.00001) + print(actual[pos] - np_array[pos]) / actual[pos] + self.assertLess((actual[pos] - np_array[pos]) / actual[pos], + 0.00001) j += 1 def test_sparse_sgd(self): -- GitLab