pretrained-models.pytorch icon indicating copy to clipboard operation
pretrained-models.pytorch copied to clipboard

xception load issue

Open yyfyan opened this issue 7 years ago • 6 comments

when I load the xception model,I meet: model_name = 'xception' # could be fbresnet152 or inceptionresnetv2 model = pretrainedmodels.dict[model_name](num_classes=1000, pretrained='imagenet') model.eval()

the error msgs: RuntimeError: Error(s) in loading state_dict for Xception: size mismatch for block1.rep.0.pointwise.weight: copying a param of torch.Size([128, 64, 1, 1]) from checkpoint, where the shape is torch.Size([128, 64]) in current model. size mismatch for block1.rep.3.pointwise.weight: copying a param of torch.Size([128, 128, 1, 1]) from checkpoint, where the shape is torch.Size([128, 128]) in current model. size mismatch for b

yyfyan avatar Oct 28 '18 03:10 yyfyan

What is your version of pytorch and pretrainedmodels?

torch.__version__
pretrainedmodels.__version__

Did you try with the last version of pretrainedmodels? (0.7.3)

pip install --upgrade pretrainedmodels

Cadene avatar Oct 28 '18 08:10 Cadene

ok,thank you. I have solved the issues.

yyfyan avatar Oct 30 '18 11:10 yyfyan

And, Can you add the improved ResNet version? original ResNet: 77 convolution improved ResNet: 77 convolution ---> 33 convolution+33 convolution+3*3 convolution

yyfyan avatar Oct 30 '18 11:10 yyfyan

@yyfyan Do you have an url to pretrained model somewhere?

Cadene avatar Oct 31 '18 17:10 Cadene

sorry,I don't find the url too.

yyfyan avatar Nov 01 '18 00:11 yyfyan

the improved ResNet version is used in PSPNet. https://github.com/hszhao/PSPNet

yyfyan avatar Nov 01 '18 12:11 yyfyan