提交 67a7a0d4 authored 作者: Frederic's avatar Frederic

small code refactoring.

上级 72275ea6
...@@ -874,8 +874,10 @@ class ProfileStats(object): ...@@ -874,8 +874,10 @@ class ProfileStats(object):
assert not (ins in view_of_temp and assert not (ins in view_of_temp and
viewed_by_temp[ins]) viewed_by_temp[ins])
# We track of the original var, so this shouldn't happen # We track of the original var, so this shouldn't happen
if dependencies[ins] and ins not in fgraph.outputs and ins.owner: if (dependencies[ins] and
if all(compute_map[v] for v in dependencies[ins]): ins not in fgraph.outputs and
ins.owner and
all(compute_map[v] for v in dependencies[ins])):
if ins not in view_of_temp and not viewed_by_temp.get(ins, []): if ins not in view_of_temp and not viewed_by_temp.get(ins, []):
mem_freed += var_mem[ins] mem_freed += var_mem[ins]
elif ins in view_of_temp: elif ins in view_of_temp:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论