提交 f70b8358 编写于 作者: W wuzewu

remove op attr when load Module

上级 264e1e18
...@@ -205,6 +205,10 @@ class Module(object): ...@@ -205,6 +205,10 @@ class Module(object):
exe = fluid.Executor(fluid.CPUPlace()) exe = fluid.Executor(fluid.CPUPlace())
self.program, _, _ = fluid.io.load_inference_model( self.program, _, _ = fluid.io.load_inference_model(
self.helper.model_path(), executor=exe) self.helper.model_path(), executor=exe)
for block in self.program.blocks:
for op in block.ops:
if "op_callstack" in op.all_attrs():
op._set_attr("op_callstack", [""])
self._load_processor() self._load_processor()
self._load_assets() self._load_assets()
self._recover_from_desc() self._recover_from_desc()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册