(self, x)
| 32 | self.fc2 = nn.Linear(128, 10) |
| 33 | |
| 34 | def forward(self, x): |
| 35 | x = self.conv1(x) |
| 36 | x = F.relu(x) |
| 37 | x = self.conv2(x) |
| 38 | x = F.relu(x) |
| 39 | x = F.max_pool2d(x, 2) |
| 40 | x = torch.flatten(x, 1) |
| 41 | x = self.fc1(x) |
| 42 | x = F.relu(x) |
| 43 | x = self.fc2(x) |
| 44 | output = F.log_softmax(x, dim=1) |
| 45 | return output |
| 46 | |
| 47 | def loss_fn(predictions, targets): |
| 48 | return F.nll_loss(predictions, targets) |
nothing calls this directly
no outgoing calls
no test coverage detected