pytorch
09e2fb8f - Make LinearPackedParams works with both torchscript and torch.package (#71656)

Commit
4 years ago
Make LinearPackedParams works with both torchscript and torch.package (#71656) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71656 Customized `__getstate__`/`__setstate__` didn't call super (torch.nn.Module), and won't restore attributes (e.g. `_modules`) after being serialized and deserialized via torch.package After a few iteration, as it turns out, pack/unpack linear param has been supported in torchbind class already, no need to hack torch module anymore. Test Plan: `buck test caffe2/test/:quantization -- test_linear_api` Reviewed By: jerryzh168 Differential Revision: D33711086 fbshipit-source-id: 3a36d10c64b7da414d3657d2ef766bb9a9290ea9 (cherry picked from commit 6337b6c20747d661a3920bf553dcc911dfa77671)
Author
Committer
Parents
Loading