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

moved more obvious check upwards

I've changed the __eq__ of scan by moving a much more obvious check up in the function
上级 5aeb2734
...@@ -98,11 +98,7 @@ class ScanOp(PureOp): ...@@ -98,11 +98,7 @@ class ScanOp(PureOp):
# Check if we are dealing with same type of objects # Check if we are dealing with same type of objects
if not type(self) == type(other): if not type(self) == type(other):
return False return False
# This are some safety checks ( namely that the inner graph has the if self.options != other.options:
# same number of inputs and same number of outputs )
elif not len(self.inputs) == len(other.inputs):
return False
elif not len(self.outputs) == len(other.outputs):
return False return False
if self.mintals != other.mintaps: if self.mintals != other.mintaps:
return False return False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论