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 SWA to PyTorch mainline #35032
Closed
Closed
Add SWA to PyTorch mainline #35032
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
506d81d
swa_utils
izmailovpavel 9a03b6d
added scheduler + finished averaged model
izmailovpavel b8f48d0
tests
izmailovpavel 6dea9ce
schedule tests working
izmailovpavel db47a08
batchnorm tests
izmailovpavel 38e838f
averaged model tests
izmailovpavel 29006bf
simplified bn update
izmailovpavel adb7bae
AveragedModel docstring
izmailovpavel 0e00e37
Added avg_fun
izmailovpavel 625271d
avg_fun tests
izmailovpavel 6a53eb1
removing extra comments
izmailovpavel c445caf
remove extra tests
izmailovpavel 11ea7d1
docstrings
izmailovpavel 58d60e7
flake8
izmailovpavel 49ce7be
pyi file
izmailovpavel d8c8439
test_optim flake8
izmailovpavel 9e7ae14
Update swalr and examples
izmailovpavel ce7d84b
data -> detach and docstring fixes
izmailovpavel ccffc7d
consistent avg_fn naming
izmailovpavel 2e9a438
device fix in tests
izmailovpavel 88c37e4
moving to
izmailovpavel 2fabebd
data -> detach in tests
izmailovpavel 6f8b4e3
moving naveraged to device
izmailovpavel c379f6d
lint
vincentqb 1af04e5
replace ema_model name by swa_model
vincentqb 3bf1eab
prec no longer supported, replacing by atol.
vincentqb 17383a7
mypy fix.
vincentqb File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be sth like
would save a minor allocation and would get more consistent with general nn initialization codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. Do you want to open a pull request for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be decided first if we do actually want to do this inplace or not (what the "inplaceness" contract should be)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair. What are you concern in particular here?