提交 7e4b9673 编写于 作者: S sandyhouse

add op_role_key, test=develop

上级 4496ab41
......@@ -4173,6 +4173,7 @@ class PipelineOptimizer(object):
'dtype': grad_var.dtype,
'value': float(0),
self._op_device_key: device,
self._op_role_key: self._op_role.Optimize.LRSched,
})
def _accumulate_gradients(self, block):
......@@ -4374,7 +4375,6 @@ class PipelineOptimizer(object):
# and clear them after update
self._clear_gradients(main_block)
self._accumulate_gradients(main_block)
#self._clear_gradients(main_block)
main_program = main_block.program
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册