Refactor torch::jit::script::Module::register_* API. (#27189)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27189
Conceptually, Module is just a view over ClassType and ivalue::object.
register_ methods are the only methods that are exception from this:
they provide an API not available on ClassType or object directly. This
PR ports this API to ClassType and makes Module truly just a view over
those two.
Test Plan: Imported from OSS
Differential Revision: D17703533
Pulled By: ZolotukhinM
fbshipit-source-id: 2cdb9fb486b3fb8527986483c7f34be7bd59fabf
Author
Mikhail Zolotukhin