未验证 提交 f73e5e19 编写于 作者: W whs 提交者: GitHub

Merge pull request #7830 from wanghaoshuang/fix_infer_io

Fix get_inference_program
......@@ -191,8 +191,8 @@ def get_inference_program(target_vars, main_program=None):
vars = []
for var in target_vars:
if isinstance(var, Evaluator):
vars.append(var.states)
vars.append(var.metrics)
vars.extend(var.states)
vars.extend(var.metrics)
else:
vars.append(var)
pruned_program = main_program.prune(targets=vars)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册