Cadene / Cadene/pretrained-models.pytorch
xception load issue
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Xception load using the model construction shown in the issue and inspect the Xception checkpoint-loading entry point. Compare the checkpoint parameter shapes with the model's expected shapes; done means pretrained Xception loads successfully without the reported state_dict size mismatches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100