| 15 | class TestPrintProgram(unittest.TestCase): |
| 16 | def test_inspect_node(self) -> None: |
| 17 | class TestModel(torch.nn.Module): |
| 18 | def __init__(self): |
| 19 | super().__init__() |
| 20 | self.conv1 = torch.nn.Conv2d(32, 32, 1) |
| 21 | self.conv2 = torch.nn.Conv2d(32, 32, 1) |
| 22 | self.conv3 = torch.nn.Conv2d(32, 32, 1) |
| 23 | self.gelu = torch.nn.GELU() |
| 24 | |
| 25 | def forward(self, x: torch.Tensor): |
| 26 | a = self.conv1(x) |
| 27 | b = self.conv2(a) |
| 28 | c = self.conv3(a + b) |
| 29 | return self.gelu(c) |
| 30 | |
| 31 | class WrapModule(torch.nn.Module): |
| 32 | def __init__(self): |