rastabastamon:

self.avgpool = nn.AdaptiveAvgPool2d((6, 6))


torch.nn.AdaptiveAvgPool2d(output_size)
also Alexnet for just MNIST is overshoot, you will severely overfit. (plus that upscale 28x28 → 227x227)