提交 17e2505a authored 作者: Roy Xue's avatar Roy Xue

change storage reset

上级 e13c2571
...@@ -685,10 +685,10 @@ class Function(object): ...@@ -685,10 +685,10 @@ class Function(object):
# check the allow_gc # check the allow_gc
# 1.no allow_gc return False 2.has allow_gc, if allow_gc is False, return True # 1.no allow_gc return False 2.has allow_gc, if allow_gc is False, return True
if not getattr(self.fn, 'allow_gc', True): if not getattr(self.fn, 'allow_gc', True):
for key in self.fn.storage_map.keys(): for _, val in self.fn.storage_map.iteritems():
storage_map[key] = None val[0] = None
for node in self.input_storage: for node in self.fn.fgraph.apply_nodes:
if node.op in ops_with_inner_function.keys(): if node.op in ops_with_inner_function.keys():
for fn in ops_with_inner_function[node.op]: for fn in ops_with_inner_function[node.op]:
fn.free() fn.free()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论