Convenience APIs for script objects (#20226)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20226
ghimport-source-id: 22937d72e35ec4eba38019284a368453089fe3eb
Differential Revision: D15243625
Pulled By: suo
fbshipit-source-id: 5e9fb773da244f9ef201dba524155c3b19b2b4e0