提交 e5b9753a 编写于 作者: L LielinJiang 提交者: qingqing01

Fix ExponentialMovingAverage api bug in python3, test=develop (#18775)

上级 a445c335
...@@ -2617,7 +2617,7 @@ class ExponentialMovingAverage(object): ...@@ -2617,7 +2617,7 @@ class ExponentialMovingAverage(object):
with param.block.program._optimized_guard( with param.block.program._optimized_guard(
[param, tmp]), name_scope('moving_average'): [param, tmp]), name_scope('moving_average'):
param_ema = self._ema_vars[param.name] param_ema = self._ema_vars[param.name]
if self._ema_vars.has_key(param.name + '.master'): if param.name + '.master' in self._ema_vars:
master_ema = self._ema_vars[param.name + '.master'] master_ema = self._ema_vars[param.name + '.master']
param_master_emas.append([param_ema, master_ema]) param_master_emas.append([param_ema, master_ema])
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册