提交 c2a33f9a authored 作者: Samira Shabanian's avatar Samira Shabanian

__props__ = ('format',) added

上级 49d42955
...@@ -615,7 +615,7 @@ class CSM(gof.Op): ...@@ -615,7 +615,7 @@ class CSM(gof.Op):
should be used to construct the sparse matrix. should be used to construct the sparse matrix.
""" """
__props__ = ('format',)
_hashval = None _hashval = None
""" """
Pre-computed hash value, defined by __init__. Pre-computed hash value, defined by __init__.
...@@ -635,15 +635,6 @@ class CSM(gof.Op): ...@@ -635,15 +635,6 @@ class CSM(gof.Op):
self._hashval = (hash(type(self)) ^ hash(self.format)) self._hashval = (hash(type(self)) ^ hash(self.format))
def __eq__(self, other):
return (type(other) is CSM and other.format == self.format)
def __hash__(self):
return self._hashval
def __str__(self):
return self.__class__.__name__
def make_node(self, data, indices, indptr, shape): def make_node(self, data, indices, indptr, shape):
data = tensor.as_tensor_variable(data) data = tensor.as_tensor_variable(data)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论