| 511 | |
| 512 | def test_clone_module_with_class(self): |
| 513 | class MyInnerTestModule(torch.nn.Module): |
| 514 | def __init__(self): |
| 515 | super().__init__() |
| 516 | self.pqr = torch.Tensor([10., 20., 30.]) |
| 517 | |
| 518 | def forward(self, inputs): |
| 519 | return inputs |
| 520 | |
| 521 | @torch.jit.export |
| 522 | def dummy_method_not_cloned(self): |
| 523 | return 20 |
| 524 | |
| 525 | class MyTestModule(torch.nn.Module): |
| 526 | def __init__(self): |