提交 37b10520 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

changed an assert to an Exception so that if the optimization fails it doesn't…

changed an assert to an Exception so that if the optimization fails it doesn't bring down the whole process
上级 ac5bbc1b
...@@ -3102,7 +3102,8 @@ def local_elemwise_fusion_op(OP, max_input_fct=lambda node: 1024): ...@@ -3102,7 +3102,8 @@ def local_elemwise_fusion_op(OP, max_input_fct=lambda node: 1024):
if not fused: if not fused:
return False return False
assert new_nb_input == len(inputs) if new_nb_input != len(inputs):
raise Exception("Something has gone wrong with the elemwise fusion optimization.")
assert len(s_inputs) == len(inputs) assert len(s_inputs) == len(inputs)
otype = node.outputs[0].type otype = node.outputs[0].type
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论