提交 fd0dd6e6 编写于 作者: W wanghaoshuang

Use extend instead of appending.

上级 ef8cb8f6
......@@ -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.
先完成此消息的编辑!
想要评论请 注册