提交 25da3fc6 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

wrong change commited in gof/graph.py and I forgot to add sparse/sharedvar.py

上级 17cdcd77
...@@ -149,8 +149,6 @@ class Apply(utils.object2): ...@@ -149,8 +149,6 @@ class Apply(utils.object2):
:returns: an Apply instance with the same op but different outputs. :returns: an Apply instance with the same op but different outputs.
""" """
# !!
strict = False
remake_node = False remake_node = False
for curr, new in zip(self.inputs, inputs): for curr, new in zip(self.inputs, inputs):
if not curr.type == new.type: if not curr.type == new.type:
......
import scipy.sparse
from theano.compile import shared_constructor, SharedVariable
from theano import config
from basic import SparseType, _sparse_py_operators
class SparseTensorSharedVariable(SharedVariable, _sparse_py_operators):
pass
@shared_constructor
def sparse_constructor(value, name=None, strict=False, format = None):
"""SharedVariable Constructor for SparseType
writeme
"""
if not isinstance(value, scipy.sparse.spmatrix):
raise TypeError()
if format is None:
format = value.format
type = SparseType(format =format, dtype = value.dtype)
return SparseTensorSharedVariable(type = type, value = value, name=name, strict =strict)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论