Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dygraph] Support param groups in grad_clip #39175

Merged
merged 3 commits into from
Jan 25, 2022
Merged

[Dygraph] Support param groups in grad_clip #39175

merged 3 commits into from
Jan 25, 2022

Conversation

haohongxiang
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

[Dygraph] Support param groups in grad_clip

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -109,6 +109,13 @@ def __init__(self,
self._optim._grad_clip = ShardingClipGrad(self._optim._grad_clip,
paddle.get_device(),
self.group)
if optim._parameter_list and isinstance(optim._parameter_list[0],
Copy link
Contributor

Choose a reason for hiding this comment

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

这个统一都用self._optim

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的。

Copy link
Contributor

@Baibaifan Baibaifan left a comment

Choose a reason for hiding this comment

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

LGTM

@Baibaifan Baibaifan merged commit b0cca48 into PaddlePaddle:develop Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants