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

Fix: epoch does not increase after finishing warming up #24

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

Haawron
Copy link
Contributor

@Haawron Haawron commented Jul 15, 2021

After the warming up phase, executing scheduler_warmup.step() does not affect scheduler_warmup.last_epoch
Since in scheduler_warmup.step, either epoch is None or not, self.after_scheduler.step updates self.after_scheduler.last_epoch instead of self.last_epoch. And it is reasonable to add self.total_epoch + 1 to make epochs seem to be continuing.

After the warming up phase, executing `scheduler_warmup.step()` does not affect `scheduler_warmup.last_epoch`
Since in `scheduler_warmup.step`, either epoch is None or not, `self.after_scheduler.step` updates `self.after_scheduler.last_epoch` instead of `self.last_epoch`. And it is reasonable to add `self.total_epoch + 1` to make epochs seem to be continuing.
@ildoonet ildoonet merged commit 7021d63 into ildoonet:master Oct 10, 2024
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