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

better hash for NumpyGenerator

上级 50dac4fa
...@@ -98,7 +98,7 @@ class NumpyGenerator(gof.op.Op): ...@@ -98,7 +98,7 @@ class NumpyGenerator(gof.op.Op):
and self.ndim == other.ndim \ and self.ndim == other.ndim \
and self.fn == other.fn and self.fn == other.fn
def __hash__(self): def __hash__(self):
return self.seed ^ self.ndim ^ id(self.fn) return self.seed ^ self.ndim ^ hash(self.fn)
def make_node(self, _shape): def make_node(self, _shape):
#TODO: check for constant shape, and guess the broadcastable bits #TODO: check for constant shape, and guess the broadcastable bits
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论