the modle The default structure of the model is nn.AdaptiveAvgPool2d(output_size=(7,7)) But the correct one is cifar_model. avgpool=nn AdaptiveAvgPool2d (output_size=(1,1))