提交 d85362be authored 作者: James Bergstra's avatar James Bergstra

epsilon better hashing function for DenseFromSparse

上级 f8d20065
......@@ -214,7 +214,7 @@ class SparseFromDense(gof.op.Op):
def __eq__(self, other):
return type(self) == type(other) and self.format == other.format
def __hash__(self):
return hash(self.format)
return hash(self.format) ^ hash(DenseFromSparse)
csr_from_dense = SparseFromDense('csr')
csc_from_dense = SparseFromDense('csc')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论