提交 74068df6 authored 作者: lamblin's avatar lamblin

Merge pull request #1450 from nouiz/tests_fix

Fix test that fail depending of the seed
...@@ -41,6 +41,13 @@ Operating System :: Microsoft :: Windows ...@@ -41,6 +41,13 @@ Operating System :: Microsoft :: Windows
Operating System :: POSIX Operating System :: POSIX
Operating System :: Unix Operating System :: Unix
Operating System :: MacOS Operating System :: MacOS
Programming Language :: Python :: 2
Programming Language :: Python :: 2.4
Programming Language :: Python :: 2.5
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
""" """
NAME = 'Theano' NAME = 'Theano'
MAINTAINER = "LISA laboratory, University of Montreal" MAINTAINER = "LISA laboratory, University of Montreal"
......
...@@ -1255,7 +1255,15 @@ class UsmmTests(unittest.TestCase): ...@@ -1255,7 +1255,15 @@ class UsmmTests(unittest.TestCase):
theano.tensor.basic.float64_atol = orig_atol theano.tensor.basic.float64_atol = orig_atol
theano.tensor.basic.float64_rtol = orig_rtol theano.tensor.basic.float64_rtol = orig_rtol
utt.assert_allclose(f_a_out, f_b_out, rtol=1e-5) # As we do a dot product of 2 vector of 100 element,
# This mean we can have 2*100*eps abs error.
if f_a_out.dtype in ['float64', 'complex128']:
atol = 3e-8
rtol = 1e-5
else:
atol = None
rtol = None
utt.assert_allclose(f_a_out, f_b_out, rtol=rtol, atol=atol)
topo = f_a.maker.fgraph.toposort() topo = f_a.maker.fgraph.toposort()
up = theano.scalar.upcast(dtype1, dtype2, dtype3, dtype4) up = theano.scalar.upcast(dtype1, dtype2, dtype3, dtype4)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论