提交 eaa657e1 authored 作者: Frederic Bastien's avatar Frederic Bastien

call the Theano function in test to allow debugmode catch more case.

上级 b15b8905
......@@ -875,6 +875,7 @@ class CastTester(unittest.TestCase):
out = tensor.cast(inp, dtype=dtype)
f = function([inp], out)
assert f(obj).dtype == numpy.dtype(dtype)
f(obj)
def test_cast_from_real_to_complex(self):
for real_dtype in REAL_DTYPES:
......@@ -884,6 +885,7 @@ class CastTester(unittest.TestCase):
f = function([inp], out)
obj = rand_of_dtype((2, ), real_dtype)
assert f(obj).dtype == numpy.dtype(complex_dtype)
f(obj)
def test_cast_from_complex_to_real_raises_error(self):
for real_dtype in REAL_DTYPES:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论