提交 a22567eb 编写于 作者: D dongzhihong

"fix almost equal error"

上级 69b1b265
...@@ -21,8 +21,8 @@ class TestRandomOp(unittest.TestCase): ...@@ -21,8 +21,8 @@ class TestRandomOp(unittest.TestCase):
ctx = core.DeviceContext.cpu_context() ctx = core.DeviceContext.cpu_context()
op.run(scope, ctx) op.run(scope, ctx)
tensor_array = numpy.array(tensor) tensor_array = numpy.array(tensor)
self.assertAlmostEqual(numpy.std(tensor_array), 1.0) self.assertAlmostEqual(numpy.mean(tensor_array), 5.0, places=3)
self.assertAlmostEqual(numpy.mean(tensor_array), 5.0) self.assertAlmostEqual(numpy.std(tensor_array), 1.0, places=3)
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册