提交 60026783 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #3479 from nouiz/float64_rtol

Don't be more strict then numpy rtol on float64.
......@@ -486,10 +486,10 @@ else:
float32_rtol = 1e-5
# defaults in numpy.allclose
# Don't be more strict then numpy rtol
# It cause useless error.
float64_rtol = 1.0000000000000001e-05
float64_atol = 1e-8
# more strict. Atleast float32 precision.
float64_rtol = 1.0000000000000001e-06
def _get_atol_rtol(a, b):
......
......@@ -3288,6 +3288,11 @@ class T_min_max(unittest.TestCase):
# axis=1)[0], n)),axis=1)
def test_basic_allclose():
# This was raised by a user in https://github.com/Theano/Theano/issues/2975
assert tensor.basic._allclose(-0.311023883434, -0.311022856884)
class T_outer(unittest.TestCase):
def test_outer(self):
for m in range(4):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论