semseg icon indicating copy to clipboard operation
semseg copied to clipboard

不能加载resnet50预训练文件

Open Dragonqingyi opened this issue 4 years ago • 5 comments

代码里的'./initmodel/resnet50_v2.pth'没有给出,加载官方的pth文件报错 RuntimeError: Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict: "conv2.weight", "bn2.weight", "bn2.bias", "bn2.running_mean", "bn2.running_var", "conv3.weight", "bn3.weight", "bn3.bias", "bn3.running_mean", "bn3.running_var". size mismatch for conv1.weight: copying a param with shape torch.Size([64, 3, 7, 7]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3]). size mismatch for layer1.0.conv1.weight: copying a param with shape torch.Size([64, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 128, 1, 1]). size mismatch for layer1.0.downsample.0.weight: copying a param with shape torch.Size([256, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 128, 1, 1]).

Dragonqingyi avatar Mar 22 '21 11:03 Dragonqingyi

本文1.3节给出了resnet50_v2.pth下载路径(initmodel目录包含该文件)。

memorylorry avatar Mar 24 '21 07:03 memorylorry

非常谢谢,已经找到了!

------------------ 原始邮件 ------------------ 发件人: "hszhao/semseg" @.>; 发送时间: 2021年3月24日(星期三) 下午3:58 @.>; @.@.>; 主题: Re: [hszhao/semseg] 不能加载resnet50预训练文件 (#73)

本文1.3节给出了resnet50_v2.pth下载路径(initmodel目录包含该文件)。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Dragonqingyi avatar Mar 24 '21 08:03 Dragonqingyi

本文1.3节给出了resnet50_v2.pth下载路径(initmodel目录包含该文件)。

Thanks very much! I also encountered this problem when I was doing pspnet!

TianheWu avatar Oct 06 '21 12:10 TianheWu

本文1.3节给出了resnet50_v2.pth下载路径(initmodel目录包含该文件)。

Thanks very much! I also encountered this problem when I was doing pspnet!

Hi Could you please post the downloaded model from that link here? I cannot register without appropriate phone number to download model, because I'm from Ukraine.

AndreyStille avatar Dec 31 '21 10:12 AndreyStille

本文1.3节给出了resnet50_v2.pth下载路径(initmodel目录包含该文件)。

Thanks very much! I also encountered this problem when I was doing pspnet!

Hi Could you please post the downloaded model from that link here? I cannot register without appropriate phone number to download model, because I'm from Ukraine.

https://drive.google.com/drive/folders/1Hrz1wOxOZm4nIIS7UMJeL79AQrdvpj6v

RongyiLi avatar Mar 03 '22 08:03 RongyiLi