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

fix l1 decay for inplace #32717

Merged

Conversation

littletomatodonkey
Copy link
Contributor

PR types

Bug fixes

PR changes

APIs

Describe

fix bug in #32710 , for which the gradient is set twice.

@paddle-bot-old
Copy link

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

Copy link
Contributor

@jerrywgz jerrywgz left a comment

Choose a reason for hiding this comment

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

LGTM

decay = block.create_var(dtype=param.dtype, shape=param.shape)
else:
sign = block.create_var(
Copy link
Contributor

Choose a reason for hiding this comment

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

静态图里也会遇到var的grad_node被设置两次报错的问题吗?

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

Choose a reason for hiding this comment

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

lgtm

@jerrywgz jerrywgz merged commit efdb0a7 into PaddlePaddle:develop May 6, 2021
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.

4 participants