huawei-noah / VanillaNet

MIT License
811 stars 56 forks source link

训练报错 #27

Closed zbl929 closed 1 year ago

zbl929 commented 1 year ago

RuntimeError: Error(s) in loading state_dict for Vanillanet: size mismatch for stem2.2.weight: copying a param with shape torch.Size([512, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([512, 1, 9, 9]). size mismatch for stages.0.act.weight: copying a param with shape torch.Size([512, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([512, 1, 9, 9]). size mismatch for stages.1.act.weight: copying a param with shape torch.Size([1024, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([1024, 1, 9, 9]). size mismatch for stages.2.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.3.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.4.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.5.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.6.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.7.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.8.act.weight: copying a param with shape torch.Size([2048, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([2048, 1, 9, 9]). size mismatch for stages.9.act.weight: copying a param with shape torch.Size([4096, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([4096, 1, 9, 9]). size mismatch for stages.10.act.weight: copying a param with shape torch.Size([4096, 1, 7, 7]) from checkpoint, the shape in current model is torch.Size([4096, 1, 9, 9]).

但我加载vanillanet13预训练权重时报错