pytorch
fbe90b65 - Cleanup special handling of Containers, allowing custom forwards (#28988)

Commit
4 years ago
Cleanup special handling of Containers, allowing custom forwards (#28988) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/28988 Make ModuleList, Sequential, ModuleDict go through the same pathway as other modules, cleaning up a bunch of code and allowing them to define custom forwards and other methods. EDIT: Previously, we would ignore an nn.Sequential attribute if it was not in `__constants__` ("did you forget to add it to Constants"). This PR scripts it even if it is not in `__constants__`. Is that what we want? Test Plan: Imported from OSS Differential Revision: D18402821 Pulled By: eellison fbshipit-source-id: dd4f28fb0df0d1ba4ad1b3bc34ba141959a433f7
Author
Elias Ellison
Parents
Loading