| 29 | |
| 30 | # Sample module |
| 31 | class M(torch.nn.Module): |
| 32 | def __init__(self): |
| 33 | super().__init__() |
| 34 | self.relu = torch.nn.ReLU() |
| 35 | |
| 36 | def forward(self, x): |
| 37 | return self.relu(x) + 1.0 |
| 38 | |
| 39 | # Symbolically trace an instance of `M`. After tracing, `self.relu` is |
| 40 | # represented as a `call_module` Node. The full operation in the |