提交 80171769 authored 作者: Ziye Fan's avatar Ziye Fan

minor fix

上级 95fdd947
......@@ -482,7 +482,7 @@ class FunctionGraph(utils.object2):
verbose = config.optimizer_verbose
if verbose:
print(reason, r, new_r)
if r.fgraph is not self:
if hasattr(r, 'fgraph') and r.fgraph is not self:
raise Exception("Cannot replace %s because it does not belong "
"to this FunctionGraph" % r, str(reason))
if r.type != new_r.type:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论