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

Adding parameters to optimizer automatically #526

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

LarsSchaaf
Copy link
Collaborator

@LarsSchaaf LarsSchaaf commented Jul 19, 2024

#525

Current Behaviour
If a new parameter is added to the model, the parameters dont get trained. This is because currently only certain parameters are explicitly added to the optimiser. This is done to be able to add different weight decays for specific parameters.

Desired behaviour
When developing and adding new Modules with new parameters one expects these to be trained during training. Hence a function that automatically adds any parameters that don't have explicit optimisation parameters defined to be added to the optimiser with default settings.

Alternatives
Printing a warning

@ilyes319
Copy link
Contributor

@LarsSchaaf Great thank you. I would move the function to script utils though: add_all_parameters_to_optimizer

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