allow classes to be used in their own methods (#20106)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20106
ghimport-source-id: e85bebfae59ad7720cfa64c5f88d5d5fa742c221
Reviewed By: shannonzhu
Differential Revision: D15202261
Pulled By: suo
fbshipit-source-id: ae01b868c0939cecf650bd2b5ad8bb94312eaef7