(self, in_dim=21, h1=64, h2=32)
| 92 | device = torch.device("cuda:1" if torch.cuda.is_available() else "cpu") |
| 93 | class MLP(nn.Module): |
| 94 | def __init__(self, in_dim=21, h1=64, h2=32): |
| 95 | super().__init__() |
| 96 | self.net = nn.Sequential( |
| 97 | nn.Linear(in_dim, h1), |
| 98 | nn.ReLU(), |
| 99 | nn.Linear(h1, h2), |
| 100 | nn.ReLU(), |
| 101 | nn.Linear(h2, 1) |
| 102 | ) |
| 103 | def forward(self, x): |
| 104 | return self.net(x) |
| 105 |
nothing calls this directly
no outgoing calls
no test coverage detected