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

Wrong number of total steps for linear warmup schedule #46

Closed
tholor opened this issue Aug 6, 2019 · 1 comment
Closed

Wrong number of total steps for linear warmup schedule #46

tholor opened this issue Aug 6, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tholor
Copy link
Member

tholor commented Aug 6, 2019

The number of total steps is currently wrongly calculated due to wrong rounding here:

optimization_steps = int(n_examples / batch_size / grad_acc_steps) * n_epochs

It's resulting in one step less than required per epoch. If running for multiple epochs, this will result in LR = 0 for the last few steps. The related warning message occurs:
Training beyond specified 't_total'. Learning rate multiplier set to 0. Please set 't_total' of {} correctly.

In addition, we start with a LR of zero for the first step which is a waste of computation.
wrong_lr

@tholor tholor added the bug Something isn't working label Aug 6, 2019
@tholor tholor self-assigned this Aug 6, 2019
@tholor tholor mentioned this issue Aug 8, 2019
@tholor
Copy link
Member Author

tholor commented Aug 8, 2019

Fixed by #54

@tholor tholor closed this as completed Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant