Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Fix iteration count #145

Merged
merged 1 commit into from
Nov 14, 2018
Merged

Fix iteration count #145

merged 1 commit into from
Nov 14, 2018

Conversation

jimmyyhwu
Copy link
Contributor

This commit changes the iteration count to reflect the true number of iterations a model has been trained for. Previously, a model trained for n + 1 iterations would be saved as model_n.pth.

This also fixes the issue where resuming from a checkpoint would result in the model training for one iteration and then immediately saving to the same checkpoint file it resumed from.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 13, 2018
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks a lot for the PR!

I think that a potentially better fix would be to modify the iteration_based_batch_sampler.py so that it takes into account this issue?

Or instead of modifying the Sampler, why can't we do

iteration = iteration + 1

right after the for iteration, ... loop?
This way we avoid propagating the +1 everywhere in the code.

Let me know what you think.

@jimmyyhwu
Copy link
Contributor Author

Yes, that should work. I modified the commit to reflect the changes.

Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fmassa fmassa merged commit 2083f9d into facebookresearch:master Nov 14, 2018
nprasad2021 pushed a commit to nprasad2021/maskrcnn-benchmark that referenced this pull request Jan 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants