| 27 | |
| 28 | # Sample module |
| 29 | class M(torch.nn.Module): |
| 30 | def __init__(self): |
| 31 | super().__init__() |
| 32 | |
| 33 | def forward(self, x, w1, w2): |
| 34 | val1 = torch.neg(w1) |
| 35 | m1 = torch.cat([val1, w2]).sum() |
| 36 | val2 = torch.neg(w1) |
| 37 | m2 = torch.cat([val2, w2]).sum() |
| 38 | return x + torch.max(m1) + torch.max(m2) |
| 39 | |
| 40 | # Symbolically trace an instance of `M` |
| 41 | traced = symbolic_trace(M()) |
no outgoing calls
no test coverage detected