def forward(self, x):
x = torch.relu(self.conv1(x))
x = self.pool1(x)
x = torch.relu(self.conv2(x))
x = self.pool2(x)
x = x.view(-1, 64 * 7 * 7)
x = self.fc(x)
return x
model = SimpleCNN()
model.load_state_dict(torch.load('mnist_cnn_single_fc.pth'))
model.eval()