提交 8f992edf authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed a test with cast_policy=numpy and floatX=float64

上级 41a80f54
...@@ -558,7 +558,11 @@ def test_sparse_shared_memory(): ...@@ -558,7 +558,11 @@ def test_sparse_shared_memory():
y = SparseType('csr', dtype='float32')() y = SparseType('csr', dtype='float32')()
sdot = theano.sparse.structured_dot sdot = theano.sparse.structured_dot
z = sdot(x*3,m1) + sdot(y*2, m2) # We use typed float32 constants to make sure there will be no upcasting,
# regardless of config.cast_policy.
fthree = tensor.constant(3, dtype='float32')
ftwo = tensor.constant(2, dtype='float32')
z = sdot(x*fthree,m1) + sdot(y*ftwo, m2)
f = theano.function([theano.In(x,mutable=True),theano.In(y,mutable = True)],z, mode='FAST_RUN') f = theano.function([theano.In(x,mutable=True),theano.In(y,mutable = True)],z, mode='FAST_RUN')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论