Optimization, Pytorch, Machine Learning, Deep Learning, Tensorboard.
hidden.append(nn.MaxPool2d(2)) self.hidden = nn.Sequential(*hidden) self.conv_out = nn.Conv2d(hidden_size, num_classes, 3, padding='same') def forward(self, x): x = F.relu(self.conv_in(x)) x = self.hidden(x) x = self.conv_out(x) x = torch.flatten(x, 1) return x Next, we define a pretty standard