ky_Pa:

            nn.MaxPool2d(kernel_size=2, stride=2, padding=0),
            # batch_size x 128 x 4 x 4
            nn.Linear(2048, 512),



You might want to add nn.Flatten() between the nn.MaxPool2d and nn.Linear() calls in the Classifier.