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

I think there is a minor error #7

Open
skhnha opened this issue Jul 20, 2022 · 1 comment
Open

I think there is a minor error #7

skhnha opened this issue Jul 20, 2022 · 1 comment

Comments

@skhnha
Copy link

skhnha commented Jul 20, 2022

Hi, thanks for making your code public. It is really great work!
I ran your code, and i think there is a minor error in your code.

On line 217 in train.py
lr_scheduler = WarmupCosineAnnealingLR(optimizer=optimizer, T_cosine_max=args.epochs * IMAGENET_TRAINSET_SIZE // args.batch_size // ngpus_per_node, warmup=args.epochs/24)

I think it makes warm up the learning rate during only 5 steps, not 5 epochs. To warm up the learning rate during 5 epochs, 'args.epochs/24' should be 'args.epochs*len(train_loader)/24'.

Therefore, I modify line 217 as follows,
lr_scheduler = WarmupCosineAnnealingLR(optimizer=optimizer, T_cosine_max=args.epochs * len(train_loader), warmup=args.epochs * len(train_loader) / 24)

Thank you!

@JUGGHM
Copy link
Owner

JUGGHM commented Jul 20, 2022

I think you are right but I remember having fixed it long ago... Anyway

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

No branches or pull requests

2 participants