提交 32a4afb7 authored 作者: Frederic's avatar Frederic

Don't reuse the same var name

上级 e6a4c073
...@@ -265,13 +265,11 @@ class FunctionGraph(utils.object2): ...@@ -265,13 +265,11 @@ class FunctionGraph(utils.object2):
self.variables.add(r) self.variables.add(r)
def __import__(self, apply_node, check=True, reason=None): def __import__(self, apply_node, check=True, reason=None):
node = apply_node
# We import the nodes in topological order. We only are interested # We import the nodes in topological order. We only are interested
# in new nodes, so we use all variables we know of as if they were the input set. # in new nodes, so we use all variables we know of as if they were the input set.
# (the functions in the graph module only use the input set to # (the functions in the graph module only use the input set to
# know where to stop going down) # know where to stop going down)
new_nodes = graph.io_toposort(self.variables, node.outputs) new_nodes = graph.io_toposort(self.variables, apply_node.outputs)
if check: if check:
for node in new_nodes: for node in new_nodes:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论