Skip to content

Commit

Permalink
fix fleet amp get_loss_scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxicoding committed Jul 2, 2021
1 parent 4032c2e commit 2ea0c4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,6 @@ def amp_init(self,
use_fp16_test=False):
return self.wrapped_opt.amp_init(place, scope, test_program,
use_fp16_test)

def get_loss_scaling(self):
return self.wrapped_opt.get_loss_scaling()
1 change: 1 addition & 0 deletions python/paddle/fluid/tests/unittests/test_fleet_amp_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def test_fleet_amp_meta_optimizer_init(self):
optimizer.minimize(cost)

print(fleet._get_applied_meta_list())
loss_scale = optimizer.get_loss_scaling()

place = paddle.CUDAPlace(0)

Expand Down

1 comment on commit 2ea0c4b

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.