-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[jit] Make ScriptModule.training an attribute instead of a parameter #19587
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
Conversation
|
Add test? |
|
This is just a refactor, it's already covered in |
eellison
left a comment
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.
Maybe add serialization test? That's that this PR was a response to right
|
@pytorchbot retest this please |
|
hey what happened to this guy |
|
@pytorchbot rebase this please |
torch/csrc/jit/script/module.cpp
Outdated
| submod->train(on); | ||
| } | ||
| register_buffer("training", torch::tensor(on ? 1 : 0, at::kLong)); | ||
| for (auto& submod : get_modules()) { |
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.
clang-format pls
facebook-github-bot
left a comment
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.
@driazati has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Redo of #19587 ](https://our.intern.facebook.com/intern/diff/15560540/) Pull Request resolved: #21078 Pulled By: driazati Differential Revision: D15560540 fbshipit-source-id: f415775d87c163f93b3bbdd5f87c9ff73f58b049
Stack from ghstack:
Remove the hack we had previously where
trainingwas a bufferDifferential Revision: D15502768