pytorch
2265cddb - Cleanup torch::jit::script::Module API for accessing attributes/parameters/submodules. (#27260)

Commit
5 years ago
Cleanup torch::jit::script::Module API for accessing attributes/parameters/submodules. (#27260) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/27260 This PR has the following changes: - Slot class is removed. In all use cases except `lower_graph` we really just needed the attribute name and thus having an extra layer of abstraction through Slot only made the code harder to understand. - get_parameters, get_attributes, get_modules, and get_slots now return a list of <name, item> pairs instead of a list of Slots. Differential Revision: D17728910 Test Plan: Imported from OSS Pulled By: ZolotukhinM fbshipit-source-id: 94781611752dd88e7fddfe8b8e0252d6ec32ba68
Author
Mikhail Zolotukhin
Parents
Loading