提交 a754fcf3 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

+ -> ^ in __hash__()

上级 d70f4daa
...@@ -759,7 +759,7 @@ class DenseFromSparse(gof.op.Op): ...@@ -759,7 +759,7 @@ class DenseFromSparse(gof.op.Op):
(self.sparse_grad == other.sparse_grad) (self.sparse_grad == other.sparse_grad)
def __hash__(self): def __hash__(self):
return hash(type(self))+hash(self.sparse_grad) return hash(type(self))^hash(self.sparse_grad)
def make_node(self, x): def make_node(self, x):
x = as_sparse_variable(x) x = as_sparse_variable(x)
......
...@@ -72,7 +72,7 @@ class T_verify_grad_sparse(unittest.TestCase): ...@@ -72,7 +72,7 @@ class T_verify_grad_sparse(unittest.TestCase):
self.structured == other.structured self.structured == other.structured
def __hash__(self): def __hash__(self):
return hash(type(self)) + hash(self.structured) return hash(type(self)) ^ hash(self.structured)
def make_node(self, x): def make_node(self, x):
x = as_sparse_variable(x) x = as_sparse_variable(x)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论