| 26 | |
| 27 | |
| 28 | class MLP_BLACKBOX(nn.Module): |
| 29 | def __init__(self, dim_in): |
| 30 | super(MLP_BLACKBOX, self).__init__() |
| 31 | self.dim_in = dim_in |
| 32 | self.fc1 = nn.Linear(self.dim_in, 64) |
| 33 | self.fc2 = nn.Linear(64, 32) |
| 34 | self.fc3 = nn.Linear(32, 2) |
| 35 | |
| 36 | def forward(self, x): |
| 37 | x = x.view(-1, self.dim_in) |
| 38 | x = F.relu(self.fc1(x)) |
| 39 | x = F.relu(self.fc2(x)) |
| 40 | x = self.fc3(x) |
| 41 | return x |
| 42 | |
| 43 | |
| 44 | class MLP_WHITEBOX(nn.Module): |