提交 2a386cf5 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Actually use requested format.

上级 4c8785f0
...@@ -23,7 +23,8 @@ from theano.sparse import as_sparse_variable, CSC, CSR, CSM, CSMProperties ...@@ -23,7 +23,8 @@ from theano.sparse import as_sparse_variable, CSC, CSR, CSM, CSMProperties
from theano.sparse import SparseType, StructuredDotCSC, CSMGrad from theano.sparse import SparseType, StructuredDotCSC, CSMGrad
from theano.sparse import AddSS, AddSD, MulSS, MulSD, Transpose, Neg from theano.sparse import AddSS, AddSD, MulSS, MulSD, Transpose, Neg
from theano.sparse import add, mul, structured_dot, transpose from theano.sparse import add, mul, structured_dot, transpose
from theano.sparse import csc_from_dense, csr_from_dense, dense_from_sparse from theano.sparse import (csc_from_dense, csr_from_dense, dense_from_sparse,
SparseFromDense)
from theano.sparse import Dot, Usmm, UsmmCscDense from theano.sparse import Dot, Usmm, UsmmCscDense
#from theano.sparse import get_item_2d, get_item_scalar #from theano.sparse import get_item_2d, get_item_scalar
...@@ -430,7 +431,7 @@ class T_conversion(unittest.TestCase): ...@@ -430,7 +431,7 @@ class T_conversion(unittest.TestCase):
broadcastable=([False] * ndim), broadcastable=([False] * ndim),
name='x') name='x')
s = csc_from_dense(x) s = SparseFromDense(format)(x)
s_m = - s s_m = - s
d = dense_from_sparse(s_m) d = dense_from_sparse(s_m)
c = d.sum() c = d.sum()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论