My pytorch version is torch==1.5.0
weight file url is: https://download.pytorch.org/models/inception_v3_google-1a9a5a14.pth
import torch
import torchvision as tv
weights = torch.load('data/pretrained_weights/inception_v3_google-1a9a5a14.pth')
net = tv.models.inception_v3(num_classes=365, pretrained=False, transform_input=False)
net.load_state_dict(weights, strict=False)
Then it throw me a error:
RuntimeError: Error(s) in loading state_dict for Inception3:
size mismatch for AuxLogits.fc.weight: copying a param with shape torch.Size([1000, 768]) from checkpoint, the shape in current model is torch.Size([365, 768]).
size mismatch for AuxLogits.fc.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([365]).
size mismatch for fc.weight: copying a param with shape torch.Size([1000, 2048]) from checkpoint, the shape in current model is torch.Size([365, 2048]).
size mismatch for fc.bias: copying a param with shape torch.Size([1000]) from checkpoint, the shape in current model is torch.Size([365]).