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

Add '--lr_scheduler_type' and '--lr_scheduler_args' argument #271

Merged
merged 6 commits into from
Mar 19, 2023

Conversation

Isotr0py
Copy link
Contributor

@Isotr0py Isotr0py commented Mar 9, 2023

  • Add argument --lr_scheduler_type and --lr_scheduler_args to use lr_scheduler from another library

For example, to use torch.optim.lr_scheduler.CosineAnnealingLR with T_max=100 as lr_scheduler, we can just add
--lr_scheduler_type "CosineAnnealingLR" --lr_scheduler_args "T_max=100" or
--lr_scheduler_type "torch.optim.lr_scheduler.CosineAnnealingLR" --lr_scheduler_args "T_max=100"

And the learning rate curve would be:
HK$ZXNQT`CIT F%9_F9$T43

@Isotr0py Isotr0py marked this pull request as ready for review March 10, 2023 11:04
@Isotr0py Isotr0py changed the title Add lr_scheduler_type and lr_scheduler_args Add '--lr_scheduler_type' and '--lr_scheduler_args' Mar 10, 2023
@Isotr0py Isotr0py changed the title Add '--lr_scheduler_type' and '--lr_scheduler_args' Add '--lr_scheduler_type' and '--lr_scheduler_args' argument Mar 10, 2023
@kohya-ss
Copy link
Owner

Thank you for this! It looks good. I will review when I have time.

@kohya-ss kohya-ss merged commit 8f08feb into kohya-ss:dev Mar 19, 2023
@kohya-ss
Copy link
Owner

I've merged. Thank you!

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