RuntimeError: size mismatch, m1: [32 x 5184], m2: [400 x 120] at /opt/conda/conda-bld/pytorch_1570910687230/work/aten/src/THC/generic/THCTensorMathBlas.cu:290

It seems the flattened output of self.conv2 and F.max_pool seems to be [batch_size, 5184], while self.fc1 expects an input of [batch_size, 400].
Which input size are you using?

1 Like