(self, x, y)
| 58 | return custom |
| 59 | |
| 60 | def forward(self, x, y): |
| 61 | if len(self.linears) == 1: |
| 62 | x = self.linears[0](x) |
| 63 | else: |
| 64 | for i, l in enumerate(self.linears): |
| 65 | x = self.linears[i // 2](x) + l(x) |
| 66 | return self.cross_entropy_loss(x, y) |
| 67 | |
| 68 | |
| 69 | class SimpleMoEModel(torch.nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected