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

exclude_from_weight_decay for AdamW #16201

Closed
markub3327 opened this issue Mar 9, 2022 · 8 comments
Closed

exclude_from_weight_decay for AdamW #16201

markub3327 opened this issue Mar 9, 2022 · 8 comments
Assignees
Labels
type:feature The user is asking for a new feature.

Comments

@markub3327
Copy link
Contributor

markub3327 commented Mar 9, 2022

Hello,

please can you add an exclude_from_weight_decay parameter to AdamW? Some parameters during weight decay must be excluded.

For more details please look here.

Thanks a lot.
Have a nice day.

@chunduriv
Copy link
Collaborator

@markub3327,

Can you please elaborate about your feature and please specify the use cases for this feature. Thanks!

@markub3327
Copy link
Contributor Author

I need to exclude some parameters from the weight decay process. Useful during training the Transformer model. List of regex patterns of variables excluded from weight decay. Variables whose names contain a substring matching the pattern will be excluded.

Here is the use case.

The code behind exclude_from_weight_decay from tensorflow/addons is here.

@jvishnuvardhan
Copy link
Contributor

@markub3327 What is the difference between this issue when compared to #16195?

Can you please state the differences clearly or close this issue this is a duplicate of #16195. Thanks!

@bhack
Copy link
Contributor

bhack commented Mar 11, 2022

This is a proposal to add exclude_from_weight_decay in AdamW that was added in Keras 30 days ago (it was already in TFA).

#16195 is related to port RectifiedAdam (a new optimizer) with exclude_from_weight_decay in Keras from TFA

@jvishnuvardhan jvishnuvardhan added keras-team-review-pending Pending review by a Keras team member. and removed stat:awaiting response from contributor labels Mar 11, 2022
@markub3327
Copy link
Contributor Author

@bhack

Thanks a lot ... Very good explanation!

@haifeng-jin
Copy link
Contributor

@chenmoneygithub Any comments on this?

@chenmoneygithub
Copy link
Contributor

@markub3327 Thanks for reporting the issue! Are you willing to open a PR to add exclude_from_weight_decay to AdamW? Thanks!

@markub3327
Copy link
Contributor Author

Yes. Thanks.

@sachinprasadhs sachinprasadhs removed the keras-team-review-pending Pending review by a Keras team member. label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature The user is asking for a new feature.
Projects
None yet
Development

No branches or pull requests

8 participants