Skip to content

Commit

Permalink
Fix untest error in test_adamax_op (#51692)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaTrainingG authored Mar 17, 2023
1 parent 3b2cd23 commit d9d3592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ def _finish_update(self, block, parameters_and_grads):
with param.block.program._optimized_guard(
[param, grad]
), name_scope('adamx'):
beta1_pow_acc = self._get_accumulator(
beta1_pow_acc = self._get_accumulator_master(
self._beta1_pow_acc_str, param
)
if in_dygraph_mode():
Expand Down
2 changes: 2 additions & 0 deletions python/paddle/fluid/tests/unittests/test_adamax_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def adamx_wrapper(
beta1=0.78,
beta2=0.899,
epsilon=1e-5,
find_master=False,
):
return paddle._C_ops.adamax_(
param,
Expand All @@ -43,6 +44,7 @@ def adamx_wrapper(
beta1,
beta2,
epsilon,
find_master,
)


Expand Down

0 comments on commit d9d3592

Please sign in to comment.