Skip to content

Commit

Permalink
bug fix for adamw (PaddlePaddle#37905)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu authored and Zjq9409 committed Dec 10, 2021
1 parent 3a30782 commit abd3506
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/paddle/fluid/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6582,7 +6582,10 @@ def mlp(input_x, input_y, hid_dim=128, label_dim=2):
print("Finished apply_optimize")
"""

return self._optimizer.apply_optimize(
func = self._optimizer.apply_optimize if hasattr(
self._optimizer,
'apply_optimize') else self._optimizer._apply_optimize
return func(
loss, startup_program=startup_program, params_grads=params_grads)

def minimize(self,
Expand Down

0 comments on commit abd3506

Please sign in to comment.