未验证 提交 34091533 编写于 作者: Y Yibing Liu 提交者: GitHub

Fix bug in continuous apply, test=develop (#27337)

上级 f992f8d7
......@@ -3570,8 +3570,10 @@ class ExponentialMovingAverage(object):
# bias correction
with layers.control_flow.Switch() as switch:
with switch.case(global_step > 0):
layers.assign(output=ema, input=ema / (1.0 - decay_pow))
layers.assign(input=ema, output=param)
layers.assign(
output=param, input=ema / (1.0 - decay_pow))
with switch.default():
layers.assign(output=param, input=ema)
self.restore_program = Program()
block = self.restore_program.global_block()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册