提交 7abd22c0 authored 作者: Frederic Bastien's avatar Frederic Bastien

Simplification. outputs of Function graph are clients. So no need for the double check.

上级 01470a1b
......@@ -319,10 +319,10 @@ class FunctionGraph(utils.object2):
del variable.fgraph
else:
apply_node = variable.owner
used_or_output = [output for output in apply_node.outputs
if output.clients or output in self.outputs]
used = [output for output in apply_node.outputs
if output.clients]
# If the apply node is not used and is not an output
if not used_or_output:
if not used:
if not hasattr(apply_node.tag, 'removed_by'):
apply_node.tag.removed_by = []
apply_node.tag.removed_by.append(str(reason))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论