提交 1c2f8c8d authored 作者: Roy Xue's avatar Roy Xue

one fix

上级 e78ee94c
...@@ -755,7 +755,7 @@ class ProfileStats(object): ...@@ -755,7 +755,7 @@ class ProfileStats(object):
mem_count -= mem_created mem_count -= mem_created
mem_count += mem_freed mem_count += mem_freed
continue continue
for var in node.outputs: for var in node.outputs:
compute_map[var][0] = 1 compute_map[var][0] = 1
...@@ -775,7 +775,8 @@ class ProfileStats(object): ...@@ -775,7 +775,8 @@ class ProfileStats(object):
for val in node.inputs: for val in node.inputs:
if (dependencies[val] and val.owner and val not in fgraph.outputs): if (dependencies[val] and val.owner and val not in fgraph.outputs):
if all(compute_map[v] for v in dependencies[val]): if all(compute_map[v] for v in dependencies[val]):
mem_freed += var_mem[val] if not dmap and not vmap:
mem_freed += var_mem[val]
mem_count += mem_created mem_count += mem_created
mem_count -= mem_freed mem_count -= mem_freed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论