提交 2ce1ed3d 编写于 作者: Q qiaolongfei

add optimized_guard for ModelAverage

上级 971cf705
......@@ -1158,7 +1158,8 @@ class ModelAverage(Optimizer):
self.params_grads.append((param, grad))
for param, grad in self.params_grads:
self._append_average_accumulate_op(param)
with param.block.program.optimized_guard(param):
self._append_average_accumulate_op(param)
self.apply_program = Program()
block = self.apply_program.global_block()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册