提交 5beaf463 编写于 作者: R rensilin

save_inference_model

Change-Id: I8dadf474be1ceb263e3e498bae5e130e72b7ffde
上级 1b51d8de
......@@ -121,6 +121,14 @@ class ModelBuilder:
with open(os.path.join(self._save_path, name), 'w') as f:
f.write(program.desc.serialize_to_string())
fluid.io.save_inference_model(self._save_path,
[var.name for var in inputs],
outputs,
executor=None,
main_program=test_program,
model_filename='inference_program',
program_only=True)
params = filter(fluid.io.is_parameter, main_program.list_vars())
vars = []
sums=[]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册