提交 8ebaac2f authored 作者: Frederic's avatar Frederic 提交者: David Warde-Farley

fix test in float32.

上级 a8646fdc
...@@ -577,7 +577,7 @@ def test_size(): ...@@ -577,7 +577,7 @@ def test_size():
""" """
for sparse_type in ('csc_matrix', 'csr_matrix'): for sparse_type in ('csc_matrix', 'csr_matrix'):
x = getattr(theano.sparse, sparse_type)() x = getattr(theano.sparse, sparse_type)()
y = getattr(scipy.sparse, sparse_type)((5, 7)) y = getattr(scipy.sparse, sparse_type)((5, 7)).astype(config.floatX)
get_size = theano.function([x], x.size) get_size = theano.function([x], x.size)
def check(): def check():
assert y.size == get_size(y) assert y.size == get_size(y)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论