提交 f7f37abb authored 作者: Razvan Pascanu's avatar Razvan Pascanu

better implementation of __eq__

Fix following Pascal suggestion of the __eq__ of scan.
上级 67beeb9d
...@@ -295,15 +295,15 @@ class Scan(Op): ...@@ -295,15 +295,15 @@ class Scan(Op):
# If everything went OK up to here, there is still one thing to # If everything went OK up to here, there is still one thing to
# check. Namely, do the internal graph represent same # check. Namely, do the internal graph represent same
# computations # computations
if not scan_utils.equal_computations(self.inputs, for self_in, other_in in zip(self.inputs, other.inputs):
other.inputs, if self_in.type != other_in.type :
strict = False): return False
return False
if not scan_utils.equal_computations(self.outputs, if not scan_utils.equal_computations(self.outputs,
other.outputs, other.outputs,
self.inputs, self.inputs,
other.inputs): other.inputs,
strict = True):
return False return False
# If they do, then they need to match in other small details # If they do, then they need to match in other small details
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论