Commit 76835e8
Expose a method getter api in Module (pytorch#11929)
Summary:
Pull Request resolved: pytorch#11929
It is sometimes useful for modules to be passed around in user space for user convenience, but for utilities those users interact with to operate on the methods directly.
This is a bit of a layering violation but it allows us to define narrower scoped helpers so I think its worth the risk that the user finds a way to trash the internal method object. In general method should be fairly robust to being trashed anyway since itself is a blessed front end api from the team.
Differential Revision: D77248983
Reviewed By: larryliu08201 parent dd4488d commit 76835e8
2 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
231 | 241 | | |
232 | 242 | | |
233 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
197 | 210 | | |
198 | 211 | | |
199 | 212 | | |
| |||
0 commit comments