-
Notifications
You must be signed in to change notification settings - Fork 24.4k
[JIT] add support for ModuleDict #25715
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
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.
Mostly good, a couple small questions
x = mod(x) | ||
|
||
for mod in self.moduledict.values(): | ||
x = mod(x) |
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.
This only checks the value is right for the last module in the dict, the results should go into a list or something so they can all be checked
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.
Well, the three modules that i have aren't commutative so it's checking that the order is correct.
test/test_jit.py
Outdated
|
||
return x, names | ||
|
||
m = M() |
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.
checkModule
does this same thing
Line 14837 in 7ab4ad7
def checkModule(self, nn_module, args): |
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.
@eellison is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Add support for nn.ModuleDict in script. This is needed to support torchvision.