Returns a self contained GraphModule with all the parameters/buffers inlined.
(self, *, flat: bool = True)
| 347 | return string |
| 348 | |
| 349 | def module(self, *, flat: bool = True) -> torch.nn.Module: |
| 350 | """ |
| 351 | Returns a self contained GraphModule with all the parameters/buffers inlined. |
| 352 | """ |
| 353 | from torch._export.unflatten import unflatten |
| 354 | from ._unlift import _unlift_exported_program_lifted_states |
| 355 | |
| 356 | if flat: |
| 357 | return _unlift_exported_program_lifted_states(self) |
| 358 | else: |
| 359 | return unflatten(self) |
| 360 | |
| 361 | @_disable_prexisiting_fake_mode |
| 362 | def run_decompositions( |