提交 55a8452a authored 作者: Razvan Pascanu's avatar Razvan Pascanu

added extra check

上级 fc1b41e0
......@@ -842,7 +842,10 @@ class ScanSaveMem(gof.Optimizer):
for old, new in old_new]
if any(old_scan_is_used):
return False
remove = [ old.owner for (old, new) in old_new]
remove = [old.owner for (old, new) in old_new]
# As Fred suggested assert that also the old node is not in
# the Graph as that will make things suboptimal
remove.append(node)
fgraph.replace_all_validate_remove(old_new,
remove,
reason='scan_save_mem')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论