提交 02b7bf18 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Added another test with nan value to verify in particular that nan != nan

上级 2d3487ad
......@@ -1179,6 +1179,12 @@ def test_nan_inf_constant_signature():
y = constant(test_constants[j])
assert (x.signature() == y.signature()) == (i == j)
# Also test that nan !=0 and nan != nan.
x = tensor.scalar()
f = theano.function([x], eq(x, numpy.nan))
assert f(0) == 0
assert f(numpy.nan) == 0
class T_Shape(unittest.TestCase):
def test_basic0(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论