提交 bfcf3fcc authored 作者: Frederic Bastien's avatar Frederic Bastien

fix DeepCopyOp.__eq__ and __hash__ fct.

上级 92147fa3
......@@ -170,6 +170,12 @@ class DeepCopyOp(theano.gof.Op):
def __str__(self):
return self.__class__.__name__
def __hash__(self):
return hash(type(self))
def __eq__(self, other):
return type(self) == type(other)
def make_node(self, x):
return theano.gof.Apply(self, [x], [x.type()])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论