Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use pretrained model such as densnet161? #9

Open
Allen-wg opened this issue Mar 14, 2019 · 3 comments
Open

How to use pretrained model such as densnet161? #9

Allen-wg opened this issue Mar 14, 2019 · 3 comments

Comments

@Allen-wg
Copy link

No description provided.

@NothingToSay99
Copy link

RuntimeError: Error(s) in loading state_dict for DenseASPP:
Unexpected key(s) in state_dict: "features.denseblock1.denselayer1.norm.1.weight", "features.denseblock1.denselayer1.norm.1.bias", "features.denseblock1.denselayer1.norm.1.running_mean", "features.denseblock1.denselayer1.norm.1.running_var", "features.denseblock1.denselayer1.conv.1.weight", "features.denseblock1.denselayer1.norm.2.weight", "features.denseblock1.denselayer1.norm.2.bias", "features.denseblock1.denselayer1.norm.2.running_mean", "features.denseblock1.denselayer1.norm.2.running_var", "features.denseblock1.denselayer1.conv.2.weight", "features.denseblock1.denselayer2.norm.1.weight", "features.denseblock1.denselayer2.norm.1.bias", "features.denseblock1.denselayer2.norm.1.running_mean", "features.denseblock1.denselayer2.norm.1.running_var", "features.denseblock1.denselayer2.conv.1.weight", "features.denseblock1.denselayer2.norm.2.weight", "features.denseblock1.denselayer2.norm.2.bias", "features.denseblock1.denselayer2.norm.2.running_mean", "features.denseblock1.denselayer2.norm.2.running_var", "features.denseblock1.denselayer2.conv.2.weight", "features.denseblock1.denselayer3.norm.1.weight", "features.denseblock1.denselayer3.norm.1.bias", "features.denseblock1.denselayer3.norm.1.running_mean", "features.denseblock1.denselayer3.norm.1.running_var", "features.denseblock1.denselayer3.conv.1.weight", "features.denseblock1.denselayer3.norm.2.weight", "features.denseblock1.denselayer3.norm.2.bias", "features.denseblock1.denselayer3.norm.2.running_mean", "features.denseblock1.denselayer3.norm.2.running_var", "features.denseblock1.denselayer3.conv.2.weight", "features.denseblock1.denselayer4.norm.1.weight", "features.denseblock1.denselayer4.norm.1.bias", "features.denseblock1.denselayer4.norm.1.running_mean", "features.denseblock1.denselayer4.norm.1.running_var", "features.denseblock1.denselayer4.conv.1.weight", "features.denseblock1.denselayer4.norm.2.weight", "features.denseblock1.denselayer4.norm.2.bias", "features.denseblock1.denselayer4.norm.2.running_mean", "features.denseblock1.denselayer4.norm.2.running_var", "features.denseblock1.denselayer4.conv.2.weight", "features.denseblock1.denselayer5.norm.1.weight", "features.denseblock1.denselayer5.norm.1.bias", "features.denseblock1.denselayer5.norm.1.running_mean", "features.denseblock1.denselayer5.norm.1.running_var", "features.denseblock1.denselayer5.conv.1.weight", "features.denseblock1.denselayer5.norm.2.weight", "features.denseblock1.denselayer5.norm.2.bias", "features.denseblock1.denselayer5.norm.2.running_mean", "features.denseblock1.denselayer5.norm.2.running_var", "features.denseblock1.denselayer5.conv.2.weight", "features.denseblock1.denselayer6.norm.1.weight", "features.denseblock1.denselayer6.norm.1.bias", "features.denseblock1.denselayer6.norm.1.running_mean", "features.denseblock1.denselayer6.norm.1.running_var", "features.denseblock1.denselayer6.conv.1.weight", "features.denseblock1.denselayer6.norm.2.weight", "features.denseblock1.denselayer6.norm.2.bias", "features.denseblock1.denselayer6.norm.2.running_mean", "features.denseblock1.denselayer6.norm.2.running_var", "features.denseblock1.denselayer6.conv.2.weight", "features.denseblock2.denselayer1.norm.1.weight", "features.denseblock2.denselayer1.norm.1.bias", "features.denseblock2.denselayer1.norm.1.running_mean", "features.denseblock2.denselayer1.norm.1.running_var", "features.denseblock2.denselayer1.conv.1.weight", "features.denseblock2.denselayer1.norm.2.weight", "features.denseblock2.denselayer1.norm.2.bias", "features.denseblock2.denselayer1.norm.2.running_mean", "features.denseblock2.denselayer1.norm.2.running_var", "features.denseblock2.denselayer1.conv.2.weight", "features.denseblock2.denselayer2.norm.1.weight", "features.denseblock2.denselayer2.norm.1.bias", "features.denseblock2.denselayer2.norm.1.running_mean", "features.denseblock2.denselayer2.norm.1.running_var", "features.denseblock2.denselayer2.conv.1.weight", "features.denseblock2.denselayer2.norm.2.weight", "features.denseblock2.denselayer2.norm.2.bias", "features.denseblock2.denselayer2.norm.2.running_mean", "features.denseblock2.denselayer2.norm.2.running_var", "features.denseblock2.denselayer2.conv.2.weight", "features.denseblock2.denselayer3.norm.1.weight", "features.denseblock2.denselayer3.norm.1.bias", "features.denseblock2.denselayer3.norm.1.running_mean", "features.denseblock2.denselayer3.norm.1.running_var", "features.denseblock2.denselayer3.conv.1.weight", "features.denseblock2.denselayer3.norm.2.weight", "features.denseblock2.denselayer3.norm.2.bias", "features.denseblock2.denselayer3.norm.2.running_mean", "features.denseblock2.denselayer3.norm.2.running_var", "features.denseblock2.denselayer3.conv.2.weight", "features.denseblock2.denselayer4.norm.1.weight", "features.denseblock2.denselayer4.norm.1.bias", "features.denseblock2.denselayer4.norm.1.running_mean", "features.denseblock2.denselayer4.norm.1.running_var", "features.denseblock2.denselayer4.conv.1.weight", "features.denseblock2.denselayer4.norm.2.weight", "features.denseblock2.denselayer4.norm.2.bias", "features.denseblock2.denselayer4.norm.2.running_mean", "features.denseblock2.denselayer4.norm.2.running_var", "features.denseblock2.denselayer4.conv.2.weight", "features.denseblock2.denselayer5.norm.1.weight", "features.denseblock2.denselayer5.norm.1.bias", "features.denseblock2.denselayer5.norm.1.running_mean", "features.denseblock2.denselayer5.norm.1.running_var", "features.denseblock2.denselayer5.conv.1.weight", "features.denseblock2.denselayer5.norm.2.weight", "features.denseblock2.denselayer5.norm.2.bias", "features.denseblock2.denselayer5.norm.2.running_mean", "features.denseblock2.denselayer5.norm.2.running_var", "features.denseblock2.denselayer5.conv.2.weight", "features.denseblock2.denselayer6.norm.1.weight", "features.denseblock2.denselayer6.norm.1.bias", "features.denseblock2.denselayer6.norm.1.running_mean", "features.denseblock2.denselayer6.norm.1.running_var", "features.denseblock2.denselayer6.conv.1.weight", "features.denseblock2.denselayer6.norm.2.weight", "features.denseblock2.denselayer6.norm.2.bias", "features.denseblock2.denselayer6.norm.2.running_mean", "features.denseblock2.denselayer6.norm.2.running_var", "features.denseblock2.denselayer6.conv.2.weight", "features.denseblock2.denselayer7.norm.1.weight", "features.denseblock2.denselayer7.norm.1.bias", "features.denseblock2.denselayer7.norm.1.running_mean", "features.denseblock2.denselayer7.norm.1.running_var", "features.denseblock2.denselayer7.conv.1.weight", "features.denseblock2.denselayer7.norm.2.weight", "features.denseblock2.denselayer7.norm.2.bias", "features.denseblock2.denselayer7.norm.2.running_mean", "features.denseblock2.denselayer7.norm.2.running_var", "features.denseblock2.denselayer7.conv.2.weight", "features.denseblock2.denselayer8.norm.1.weight", "features.denseblock2.denselayer8.norm.1.bias", "features.denseblock2.denselayer8.norm.1.running_mean", "features.denseblock2.denselayer8.norm.1.running_var", "features.denseblock2.denselayer8.conv.1.weight", "features.denseblock2.denselayer8.norm.2.weight", "features.denseblock2.denselayer8.norm.2.bias", "features.denseblock2.denselayer8.norm.2.running_mean", "features.denseblock2.denselayer8.norm.2.running_var", "features.denseblock2.denselayer8.conv.2.weight", "features.denseblock2.denselayer9.norm.1.weight", "features.denseblock2.denselayer9.norm.1.bias", "features.denseblock2.denselayer9.norm.1.running_mean", "features.denseblock2.denselayer9.norm.1.running_var", "features.denseblock2.denselayer9.conv.1.weight", "features.denseblock2.denselayer9.norm.2.weight", "features.denseblock2.denselayer9.norm.2.bias", "features.denseblock2.denselayer9.norm.2.running_mean", "features.denseblock2.denselayer9.norm.2.running_var", "features.denseblock2.denselayer9.conv.2.weight", "features.denseblock2.denselayer10.norm.1.weight", "features.denseblock2.denselayer10.norm.1.bias", "features.denseblock2.denselayer10.norm.1.running_mean", "features.denseblock2.denselayer10.norm.1.running_var", "features.denseblock2.denselayer10.conv.1.weight", "features.denseblock2.denselayer10.norm.2.weight", "features.denseblock2.denselayer10.norm.2.bias", "features.denseblock2.denselayer10.norm.2.running_mean", "features.denseblock2.denselayer10.norm.2.running_var", "features.denseblock2.denselayer10.conv.2.weight", "features.denseblock2.denselayer11.norm.1.weight", "features.denseblock2.denselayer11.norm.1.bias", "features.denseblock2.denselayer11.norm.1.running_mean", "features.denseblock2.denselayer11.norm.1.running_var", "features.denseblock2.denselayer11.conv.1.weight", "features.denseblock2.denselayer11.norm.2.weight", "features.denseblock2.denselayer11.norm.2.bias", "features.denseblock2.denselayer11.norm.2.running_mean", "features.denseblock2.denselayer11.norm.2.running_var", "features.denseblock2.denselayer11.conv.2.weight", "features.denseblock2.denselayer12.norm.1.weight", "features.denseblock2.denselayer12.norm.1.bias", "features.denseblock2.denselayer12.norm.1.running_mean", "features.denseblock2.denselayer12.norm.1.running_var", "features.denseblock2.denselayer12.conv.1.weight", "features.denseblock2.denselayer12.norm.2.weight", "features.denseblock2.denselayer12.norm.2.bias", "features.denseblock2.denselayer12.norm.2.running_mean", "features.denseblock2.denselayer12.norm.2.running_var", "features.denseblock2.denselayer12.conv.2.weight", "features.denseblock3.denselayer1.norm.1.weight", "features.denseblock3.denselayer1.norm.1.bias", "features.denseblock3.denselayer1.norm.1.running_mean", "features.denseblock3.denselayer1.norm.1.running_var", "features.denseblock3.denselayer1.conv.1.weight", "features.denseblock3.denselayer1.norm.2.weight", "features.denseblock3.denselayer1.norm.2.bias", "features.denseblock3.denselayer1.norm.2.running_mean", "features.denseblock3.denselayer1.norm.2.running_var", "features.denseblock3.denselayer1.conv.2.weight", "features.denseblock3.denselayer2.norm.1.weight", "features.denseblock3.denselayer2.norm.1.bias", "features.denseblock3.denselayer2.norm.1.running_mean", "features.denseblock3.denselayer2.norm.1.running_var", "features.denseblock3.denselayer2.conv.1.weight", "features.denseblock3.denselayer2.norm.2.weight", "features.denseblock3.denselayer2.norm.2.bias", "features.denseblock3.denselayer2.norm.2.running_mean", "features.denseblock3.denselayer2.norm.2.running_var", "features.denseblock3.denselayer2.conv.2.weight", "features.denseblock3.denselayer3.norm.1.weight", "features.denseblock3.denselayer3.norm.1.bias", "features.denseblock3.denselayer3.norm.1.running_mean", "features.denseblock3.denselayer3.norm.1.running_var", "features.denseblock3.denselayer3.conv.1.weight", "features.denseblock3.denselayer3.norm.2.weight", "features.denseblock3.denselayer3.norm.2.bias", "features.denseblock3.denselayer3.norm.2.running_mean", "features.denseblock3.denselayer3.norm.2.running_var", "features.denseblock3.denselayer3.conv.2.weight", "features.denseblock3.denselayer4.norm.1.weight", "features.denseblock3.denselayer4.norm.1.bias", "features.denseblock3.denselayer4.norm.1.running_mean", "features.denseblock3.denselayer4.norm.1.running_var", "features.denseblock3.denselayer4.conv.1.weight", "features.denseblock3.denselayer4.norm.2.weight", "features.denseblock3.denselayer4.norm.2.bias", "features.denseblock3.denselayer4.norm.2.running_mean", "features.denseblock3.denselayer4.norm.2.running_var", "features.denseblock3.denselayer4.conv.2.weight", "features.denseblock3.denselayer5.norm.1.weight", "features.denseblock3.denselayer5.norm.1.bias", "features.denseblock3.denselayer5.norm.1.running_mean", "features.denseblock3.denselayer5.norm.1.running_var", "features.denseblock3.denselayer5.conv.1.weight", "features.denseblock3.denselayer5.norm.2.weight", "features.denseblock3.denselayer5.norm.2.bias", "features.denseblock3.denselayer5.norm.2.running_mean", "features.denseblock3.denselayer5.norm.2.running_var", "features.denseblock3.denselayer5.conv.2.weight", "features.denseblock3.denselayer6.norm.1.weight", "features.denseblock3.denselayer6.norm.1.bias", "features.denseblock3.denselayer6.norm.1.running_mean", "features.denseblock3.denselayer6.norm.1.running_var", "features.denseblock3.denselayer6.conv.1.weight", "features.denseblock3.denselayer6.norm.2.weight", "features.denseblock3.denselayer6.norm.2.bias", "features.denseblock3.denselayer6.norm.2.running_mean", "features.denseblock3.denselayer6.norm.2.running_var", "features.denseblock3.denselayer6.conv.2.weight", "features.denseblock3.denselayer7.norm.1.weight", "features.denseblock3.denselayer7.norm.1.bias", "features.denseblock3.denselayer7.norm.1.running_mean", "features.denseblock3.denselayer7.norm.1.running_var", "features.denseblock3.denselayer7.conv.1.weight", "features.denseblock3.denselayer7.norm.2.weight", "features.denseblock3.denselayer7.norm.2.bias", "features.denseblock3.denselayer7.norm.2.running_mean", "features.denseblock3.denselayer7.norm.2.running_var", "features.denseblock3.denselayer7.conv.2.weight", "features.denseblock3.denselayer8.norm.1.weight", "features.denseblock3.denselayer8.norm.1.bias", "features.denseblock3.denselayer8.norm.1.running_mean", "features.denseblock3.denselayer8.norm.1.running_var", "features.denseblock3.denselayer8.conv.1.weight", "features.denseblock3.denselayer8.norm.2.weight", "features.denseblock3.denselayer8.norm.2.bias", "features.denseblock3.denselayer8.norm.2.running_mean", "features.denseblock3.denselayer8.norm.2.running_var", "features.denseblock3.denselayer8.conv.2.weight", "features.denseblock3.denselayer9.norm.1.weight", "features.denseblock3.denselayer9.norm.1.bias", "features.denseblock3.denselayer9.norm.1.running_mean", "features.denseblock3.denselayer9.norm.1.running_var", "features.denseblock3.denselayer9.conv.1.weight", "features.denseblock3.denselayer9.norm.2.weight", "features.denseblock3.denselayer9.norm.2.bias", "features.denseblock3.denselayer9.norm.2.running_mean", "features.denseblock3.denselayer9.norm.2.running_var", "features.denseblock3.denselayer9.conv.2.weight", "features.denseblock3.denselayer10.norm.1.weight", "features.denseblock3.denselayer10.norm.1.bias", "features.denseblock3.denselayer10.norm.1.running_mean", "features.denseblock3.denselayer10.norm.1.running_var", "features.denseblock3.denselayer10.conv.1.weight", "features.denseblock3.denselayer10.norm.2.weight", "features.denseblock3.denselayer10.norm.2.bias", "features.denseblock3.denselayer10.norm.2.running_mean", "features.denseblock3.denselayer10.norm.2.running_var", "features.denseblock3.denselayer10.conv.2.weight", "features.denseblock3.denselayer11.norm.1.weight", "features.denseblock3.denselayer11.norm.1.bias", "features.denseblock3.denselayer11.norm.1.running_mean", "features.denseblock3.denselayer11.norm.1.running_var", "features.denseblock3.denselayer11.conv.1.weight", "features.denseblock3.denselayer11.norm.2.weight", "features.denseblock3.denselayer11.norm.2.bias", "features.denseblock3.denselayer11.norm.2.running_mean", "features.denseblock3.denselayer11.norm.2.running_var", "features.denseblock3.denselayer11.conv.2.weight", "features.denseblock3.denselayer12.norm.1.weight", "features.denseblock3.denselayer12.norm.1.bias", "features.denseblock3.denselayer12.norm.1.running_mean", "features.denseblock3.denselayer12.norm.1.running_var", "features.denseblock3.denselayer12.conv.1.weight", "features.denseblock3.denselayer12.norm.2.weight", "features.denseblock3.denselayer12.norm.2.bias", "features.denseblock3.denselayer12.norm.2.running_mean", "features.denseblock3.denselayer12.norm.2.running_var", "features.denseblock3.denselayer12.conv.2.weight", "features.denseblock3.denselayer13.norm.1.weight", "features.denseblock3.denselayer13.norm.1.bias", "features.denseblock3.denselayer13.norm.1.running_mean", "features.denseblock3.denselayer13.norm.1.running_var", "features.denseblock3.denselayer13.conv.1.weight", "features.denseblock3.denselayer13.norm.2.weight", "features.denseblock3.denselayer13.norm.2.bias", "features.denseblock3.denselayer13.norm.2.running_mean", "features.denseblock3.denselayer13.norm.2.running_var", "features.denseblock3.denselayer13.conv.2.weight", "features.denseblock3.denselayer14.norm.1.weight", "features.denseblock3.denselayer14.norm.1.bias", "features.denseblock3.denselayer14.norm.1.running_mean", "features.denseblock3.denselayer14.norm.1.running_var", "features.denseblock3.denselayer14.conv.1.weight", "features.denseblock3.denselayer14.norm.2.weight", "features.denseblock3.denselayer14.norm.2.bias", "features.denseblock3.denselayer14.norm.2.running_mean", "features.denseblock3.denselayer14.norm.2.running_var", "features.denseblock3.denselayer14.conv.2.weight", "features.denseblock3.denselayer15.norm.1.weight", "features.denseblock3.denselayer15.norm.1.bias", "features.denseblock3.denselayer15.norm.1.running_mean", "features.denseblock3.denselayer15.norm.1.running_var", "features.denseblock3.denselayer15.conv.1.weight", "features.denseblock3.denselayer15.norm.2.weight", "features.denseblock3.denselayer15.norm.2.bias", "features.denseblock3.denselayer15.norm.2.running_mean", "features.denseblock3.denselayer15.norm.2.running_var", "features.denseblock3.denselayer15.conv.2.weight", "features.denseblock3.denselayer16.norm.1.weight", "features.denseblock3.denselayer16.norm.1.bias", "features.denseblock3.denselayer16.norm.1.running_mean", "features.denseblock3.denselayer16.norm.1.running_var", "features.denseblock3.denselayer16.conv.1.weight", "features.denseblock3.denselayer16.norm.2.weight", "features.denseblock3.denselayer16.norm.2.bias", "features.denseblock3.denselayer16.norm.2.running_mean", "features.denseblock3.denselayer16.norm.2.running_var", "features.denseblock3.denselayer16.conv.2.weight", "features.denseblock3.denselayer17.norm.1.weight", "features.denseblock3.denselayer17.norm.1.bias", "features.denseblock3.denselayer17.norm.1.running_mean", "features.denseblock3.denselayer17.norm.1.running_var", "features.denseblock3.denselayer17.conv.1.weight", "features.denseblock3.denselayer17.norm.2.weight", "features.denseblock3.denselayer17.norm.2.bias", "features.denseblock3.denselayer17.norm.2.running_mean", "features.denseblock3.denselayer17.norm.2.running_var", "features.denseblock3.denselayer17.conv.2.weight", "features.denseblock3.denselayer18.norm.1.weight", "features.denseblock3.denselayer18.norm.1.bias", "features.denseblock3.denselayer18.norm.1.running_mean", "features.denseblock3.denselayer18.norm.1.running_var", "features.denseblock3.denselayer18.conv.1.weight", "features.denseblock3.denselayer18.norm.2.weight", "features.denseblock3.denselayer18.norm.2.bias", "features.denseblock3.denselayer18.norm.2.running_mean", "features.denseblock3.denselayer18.norm.2.running_var", "features.denseblock3.denselayer18.conv.2.weight", "features.denseblock3.denselayer19.norm.1.weight", "features.denseblock3.denselayer19.norm.1.bias", "features.denseblock3.denselayer19.norm.1.running_mean", "features.denseblock3.denselayer19.norm.1.running_var", "features.denseblock3.denselayer19.conv.1.weight", "features.denseblock3.denselayer19.norm.2.weight", "features.denseblock3.denselayer19.norm.2.bias", "features.denseblock3.denselayer19.norm.2.running_mean", "features.denseblock3.denselayer19.norm.2.running_var", "features.denseblock3.denselayer19.conv.2.weight", "features.denseblock3.denselayer20.norm.1.weight", "features.denseblock3.denselayer20.norm.1.bias", "features.denseblock3.denselayer20.norm.1.running_mean", "features.denseblock3.denselayer20.norm.1.running_var", "features.denseblock3.denselayer20.conv.1.weight", "features.denseblock3.denselayer20.norm.2.weight", "features.denseblock3.denselayer20.norm.2.bias", "features.denseblock3.denselayer20.norm.2.running_mean", "features.denseblock3.denselayer20.norm.2.running_var", "features.denseblock3.denselayer20.conv.2.weight", "features.denseblock3.denselayer21.norm.1.weight", "features.denseblock3.denselayer21.norm.1.bias", "features.denseblock3.denselayer21.norm.1.running_mean", "features.denseblock3.denselayer21.norm.1.running_var", "features.denseblock3.denselayer21.conv.1.weight", "features.denseblock3.denselayer21.norm.2.weight", "features.denseblock3.denselayer21.norm.2.bias", "features.denseblock3.denselayer21.norm.2.running_mean", "features.denseblock3.denselayer21.norm.2.running_var", "features.denseblock3.denselayer21.conv.2.weight", "features.denseblock3.denselayer22.norm.1.weight", "features.denseblock3.denselayer22.norm.1.bias", "features.denseblock3.denselayer22.norm.1.running_mean", "features.denseblock3.denselayer22.norm.1.running_var", "features.denseblock3.denselayer22.conv.1.weight", "features.denseblock3.denselayer22.norm.2.weight", "features.denseblock3.denselayer22.norm.2.bias", "features.denseblock3.denselayer22.norm.2.running_mean", "features.denseblock3.denselayer22.norm.2.running_var", "features.denseblock3.denselayer22.conv.2.weight", "features.denseblock3.denselayer23.norm.1.weight", "features.denseblock3.denselayer23.norm.1.bias", "features.denseblock3.denselayer23.norm.1.running_mean", "features.denseblock3.denselayer23.norm.1.running_var", "features.denseblock3.denselayer23.conv.1.weight", "features.denseblock3.denselayer23.norm.2.weight", "features.denseblock3.denselayer23.norm.2.bias", "features.denseblock3.denselayer23.norm.2.running_mean", "features.denseblock3.denselayer23.norm.2.running_var", "features.denseblock3.denselayer23.conv.2.weight", "features.denseblock3.denselayer24.norm.1.weight", "features.denseblock3.denselayer24.norm.1.bias", "features.denseblock3.denselayer24.norm.1.running_mean", "features.denseblock3.denselayer24.norm.1.running_var", "features.denseblock3.denselayer24.conv.1.weight", "features.denseblock3.denselayer24.norm.2.weight", "features.denseblock3.denselayer24.norm.2.bias", "features.denseblock3.denselayer24.norm.2.running_mean", "features.denseblock3.denselayer24.norm.2.running_var", "features.denseblock3.denselayer24.conv.2.weight", "features.denseblock3.denselayer25.norm.1.weight", "features.denseblock3.denselayer25.norm.1.bias", "features.denseblock3.denselayer25.norm.1.running_mean", "features.denseblock3.denselayer25.norm.1.running_var", "features.denseblock3.denselayer25.conv.1.weight", "features.denseblock3.denselayer25.norm.2.weight", "features.denseblock3.denselayer25.norm.2.bias", "features.denseblock3.denselayer25.norm.2.running_mean", "features.denseblock3.denselayer25.norm.2.running_var", "features.denseblock3.denselayer25.conv.2.weight", "features.denseblock3.denselayer26.norm.1.weight", "features.denseblock3.denselayer26.norm.1.bias", "features.denseblock3.denselayer26.norm.1.running_mean", "features.denseblock3.denselayer26.norm.1.running_var", "features.denseblock3.denselayer26.conv.1.weight", "features.denseblock3.denselayer26.norm.2.weight", "features.denseblock3.denselayer26.norm.2.bias", "features.denseblock3.denselayer26.norm.2.running_mean", "features.denseblock3.denselayer26.norm.2.running_var", "features.denseblock3.denselayer26.conv.2.weight", "features.denseblock3.denselayer27.norm.1.weight", "features.denseblock3.denselayer27.norm.1.bias", "features.denseblock3.denselayer27.norm.1.running_mean", "features.denseblock3.denselayer27.norm.1.running_var", "features.denseblock3.denselayer27.conv.1.weight", "features.denseblock3.denselayer27.norm.2.weight", "features.denseblock3.denselayer27.norm.2.bias", "features.denseblock3.denselayer27.norm.2.running_mean", "features.denseblock3.denselayer27.norm.2.running_var", "features.denseblock3.denselayer27.conv.2.weight", "features.denseblock3.denselayer28.norm.1.weight", "features.denseblock3.denselayer28.norm.1.bias", "features.denseblock3.denselayer28.norm.1.running_mean", "features.denseblock3.denselayer28.norm.1.running_var", "features.denseblock3.denselayer28.conv.1.weight", "features.denseblock3.denselayer28.norm.2.weight", "features.denseblock3.denselayer28.norm.2.bias", "features.denseblock3.denselayer28.norm.2.running_mean", "features.denseblock3.denselayer28.norm.2.running_var", "features.denseblock3.denselayer28.conv.2.weight", "features.denseblock3.denselayer29.norm.1.weight", "features.denseblock3.denselayer29.norm.1.bias", "features.denseblock3.denselayer29.norm.1.running_mean", "features.denseblock3.denselayer29.norm.1.running_var", "features.denseblock3.denselayer29.conv.1.weight", "features.denseblock3.denselayer29.norm.2.weight", "features.denseblock3.denselayer29.norm.2.bias", "features.denseblock3.denselayer29.norm.2.running_mean", "features.denseblock3.denselayer29.norm.2.running_var", "features.denseblock3.denselayer29.conv.2.weight", "features.denseblock3.denselayer30.norm.1.weight", "features.denseblock3.denselayer30.norm.1.bias", "features.denseblock3.denselayer30.norm.1.running_mean", "features.denseblock3.denselayer30.norm.1.running_var", "features.denseblock3.denselayer30.conv.1.weight", "features.denseblock3.denselayer30.norm.2.weight", "features.denseblock3.denselayer30.norm.2.bias", "features.denseblock3.denselayer30.norm.2.running_mean", "features.denseblock3.denselayer30.norm.2.running_var", "features.denseblock3.denselayer30.conv.2.weight", "features.denseblock3.denselayer31.norm.1.weight", "features.denseblock3.denselayer31.norm.1.bias", "features.denseblock3.denselayer31.norm.1.running_mean", "features.denseblock3.denselayer31.norm.1.running_var", "features.denseblock3.denselayer31.conv.1.weight", "features.denseblock3.denselayer31.norm.2.weight", "features.denseblock3.denselayer31.norm.2.bias", "features.denseblock3.denselayer31.norm.2.running_mean", "features.denseblock3.denselayer31.norm.2.running_var", "features.denseblock3.denselayer31.conv.2.weight", "features.denseblock3.denselayer32.norm.1.weight", "features.denseblock3.denselayer32.norm.1.bias", "features.denseblock3.denselayer32.norm.1.running_mean", "features.denseblock3.denselayer32.norm.1.running_var", "features.denseblock3.denselayer32.conv.1.weight", "features.denseblock3.denselayer32.norm.2.weight", "features.denseblock3.denselayer32.norm.2.bias", "features.denseblock3.denselayer32.norm.2.running_mean", "features.denseblock3.denselayer32.norm.2.running_var", "features.denseblock3.denselayer32.conv.2.weight", "features.denseblock3.denselayer33.norm.1.weight", "features.denseblock3.denselayer33.norm.1.bias", "features.denseblock3.denselayer33.norm.1.running_mean", "features.denseblock3.denselayer33.norm.1.running_var", "features.denseblock3.denselayer33.conv.1.weight", "features.denseblock3.denselayer33.norm.2.weight", "features.denseblock3.denselayer33.norm.2.bias", "features.denseblock3.denselayer33.norm.2.running_mean", "features.denseblock3.denselayer33.norm.2.running_var", "features.denseblock3.denselayer33.conv.2.weight", "features.denseblock3.denselayer34.norm.1.weight", "features.denseblock3.denselayer34.norm.1.bias", "features.denseblock3.denselayer34.norm.1.running_mean", "features.denseblock3.denselayer34.norm.1.running_var", "features.denseblock3.denselayer34.conv.1.weight", "features.denseblock3.denselayer34.norm.2.weight", "features.denseblock3.denselayer34.norm.2.bias", "features.denseblock3.denselayer34.norm.2.running_mean", "features.denseblock3.denselayer34.norm.2.running_var", "features.denseblock3.denselayer34.conv.2.weight", "features.denseblock3.denselayer35.norm.1.weight", "features.denseblock3.denselayer35.norm.1.bias", "features.denseblock3.denselayer35.norm.1.running_mean", "features.denseblock3.denselayer35.norm.1.running_var", "features.denseblock3.denselayer35.conv.1.weight", "features.denseblock3.denselayer35.norm.2.weight", "features.denseblock3.denselayer35.norm.2.bias", "features.denseblock3.denselayer35.norm.2.running_mean", "features.denseblock3.denselayer35.norm.2.running_var", "features.denseblock3.denselayer35.conv.2.weight", "features.denseblock3.denselayer36.norm.1.weight", "features.denseblock3.denselayer36.norm.1.bias", "features.denseblock3.denselayer36.norm.1.running_mean", "features.denseblock3.denselayer36.norm.1.running_var", "features.denseblock3.denselayer36.conv.1.weight", "features.denseblock3.denselayer36.norm.2.weight", "features.denseblock3.denselayer36.norm.2.bias", "features.denseblock3.denselayer36.norm.2.running_mean", "features.denseblock3.denselayer36.norm.2.running_var", "features.denseblock3.denselayer36.conv.2.weight", "features.denseblock4.denselayer1.norm.1.weight", "features.denseblock4.denselayer1.norm.1.bias", "features.denseblock4.denselayer1.norm.1.running_mean", "features.denseblock4.denselayer1.norm.1.running_var", "features.denseblock4.denselayer1.conv.1.weight", "features.denseblock4.denselayer1.norm.2.weight", "features.denseblock4.denselayer1.norm.2.bias", "features.denseblock4.denselayer1.norm.2.running_mean", "features.denseblock4.denselayer1.norm.2.running_var", "features.denseblock4.denselayer1.conv.2.weight", "features.denseblock4.denselayer2.norm.1.weight", "features.denseblock4.denselayer2.norm.1.bias", "features.denseblock4.denselayer2.norm.1.running_mean", "features.denseblock4.denselayer2.norm.1.running_var", "features.denseblock4.denselayer2.conv.1.weight", "features.denseblock4.denselayer2.norm.2.weight", "features.denseblock4.denselayer2.norm.2.bias", "features.denseblock4.denselayer2.norm.2.running_mean", "features.denseblock4.denselayer2.norm.2.running_var", "features.denseblock4.denselayer2.conv.2.weight", "features.denseblock4.denselayer3.norm.1.weight", "features.denseblock4.denselayer3.norm.1.bias", "features.denseblock4.denselayer3.norm.1.running_mean", "features.denseblock4.denselayer3.norm.1.running_var", "features.denseblock4.denselayer3.conv.1.weight", "features.denseblock4.denselayer3.norm.2.weight", "features.denseblock4.denselayer3.norm.2.bias", "features.denseblock4.denselayer3.norm.2.running_mean", "features.denseblock4.denselayer3.norm.2.running_var", "features.denseblock4.denselayer3.conv.2.weight", "features.denseblock4.denselayer4.norm.1.weight", "features.denseblock4.denselayer4.norm.1.bias", "features.denseblock4.denselayer4.norm.1.running_mean", "features.denseblock4.denselayer4.norm.1.running_var", "features.denseblock4.denselayer4.conv.1.weight", "features.denseblock4.denselayer4.norm.2.weight", "features.denseblock4.denselayer4.norm.2.bias", "features.denseblock4.denselayer4.norm.2.running_mean", "features.denseblock4.denselayer4.norm.2.running_var", "features.denseblock4.denselayer4.conv.2.weight", "features.denseblock4.denselayer5.norm.1.weight", "features.denseblock4.denselayer5.norm.1.bias", "features.denseblock4.denselayer5.norm.1.running_mean", "features.denseblock4.denselayer5.norm.1.running_var", "features.denseblock4.denselayer5.conv.1.weight", "features.denseblock4.denselayer5.norm.2.weight", "features.denseblock4.denselayer5.norm.2.bias", "features.denseblock4.denselayer5.norm.2.running_mean", "features.denseblock4.denselayer5.norm.2.running_var", "features.denseblock4.denselayer5.conv.2.weight", "features.denseblock4.denselayer6.norm.1.weight", "features.denseblock4.denselayer6.norm.1.bias", "features.denseblock4.denselayer6.norm.1.running_mean", "features.denseblock4.denselayer6.norm.1.running_var", "features.denseblock4.denselayer6.conv.1.weight", "features.denseblock4.denselayer6.norm.2.weight", "features.denseblock4.denselayer6.norm.2.bias", "features.denseblock4.denselayer6.norm.2.running_mean", "features.denseblock4.denselayer6.norm.2.running_var", "features.denseblock4.denselayer6.conv.2.weight", "features.denseblock4.denselayer7.norm.1.weight", "features.denseblock4.denselayer7.norm.1.bias", "features.denseblock4.denselayer7.norm.1.running_mean", "features.denseblock4.denselayer7.norm.1.running_var", "features.denseblock4.denselayer7.conv.1.weight", "features.denseblock4.denselayer7.norm.2.weight", "features.denseblock4.denselayer7.norm.2.bias", "features.denseblock4.denselayer7.norm.2.running_mean", "features.denseblock4.denselayer7.norm.2.running_var", "features.denseblock4.denselayer7.conv.2.weight", "features.denseblock4.denselayer8.norm.1.weight", "features.denseblock4.denselayer8.norm.1.bias", "features.denseblock4.denselayer8.norm.1.running_mean", "features.denseblock4.denselayer8.norm.1.running_var", "features.denseblock4.denselayer8.conv.1.weight", "features.denseblock4.denselayer8.norm.2.weight", "features.denseblock4.denselayer8.norm.2.bias", "features.denseblock4.denselayer8.norm.2.running_mean", "features.denseblock4.denselayer8.norm.2.running_var", "features.denseblock4.denselayer8.conv.2.weight", "features.denseblock4.denselayer9.norm.1.weight", "features.denseblock4.denselayer9.norm.1.bias", "features.denseblock4.denselayer9.norm.1.running_mean", "features.denseblock4.denselayer9.norm.1.running_var", "features.denseblock4.denselayer9.conv.1.weight", "features.denseblock4.denselayer9.norm.2.weight", "features.denseblock4.denselayer9.norm.2.bias", "features.denseblock4.denselayer9.norm.2.running_mean", "features.denseblock4.denselayer9.norm.2.running_var", "features.denseblock4.denselayer9.conv.2.weight", "features.denseblock4.denselayer10.norm.1.weight", "features.denseblock4.denselayer10.norm.1.bias", "features.denseblock4.denselayer10.norm.1.running_mean", "features.denseblock4.denselayer10.norm.1.running_var", "features.denseblock4.denselayer10.conv.1.weight", "features.denseblock4.denselayer10.norm.2.weight", "features.denseblock4.denselayer10.norm.2.bias", "features.denseblock4.denselayer10.norm.2.running_mean", "features.denseblock4.denselayer10.norm.2.running_var", "features.denseblock4.denselayer10.conv.2.weight", "features.denseblock4.denselayer11.norm.1.weight", "features.denseblock4.denselayer11.norm.1.bias", "features.denseblock4.denselayer11.norm.1.running_mean", "features.denseblock4.denselayer11.norm.1.running_var", "features.denseblock4.denselayer11.conv.1.weight", "features.denseblock4.denselayer11.norm.2.weight", "features.denseblock4.denselayer11.norm.2.bias", "features.denseblock4.denselayer11.norm.2.running_mean", "features.denseblock4.denselayer11.norm.2.running_var", "features.denseblock4.denselayer11.conv.2.weight", "features.denseblock4.denselayer12.norm.1.weight", "features.denseblock4.denselayer12.norm.1.bias", "features.denseblock4.denselayer12.norm.1.running_mean", "features.denseblock4.denselayer12.norm.1.running_var", "features.denseblock4.denselayer12.conv.1.weight", "features.denseblock4.denselayer12.norm.2.weight", "features.denseblock4.denselayer12.norm.2.bias", "features.denseblock4.denselayer12.norm.2.running_mean", "features.denseblock4.denselayer12.norm.2.running_var", "features.denseblock4.denselayer12.conv.2.weight", "features.denseblock4.denselayer13.norm.1.weight", "features.denseblock4.denselayer13.norm.1.bias", "features.denseblock4.denselayer13.norm.1.running_mean", "features.denseblock4.denselayer13.norm.1.running_var", "features.denseblock4.denselayer13.conv.1.weight", "features.denseblock4.denselayer13.norm.2.weight", "features.denseblock4.denselayer13.norm.2.bias", "features.denseblock4.denselayer13.norm.2.running_mean", "features.denseblock4.denselayer13.norm.2.running_var", "features.denseblock4.denselayer13.conv.2.weight", "features.denseblock4.denselayer14.norm.1.weight", "features.denseblock4.denselayer14.norm.1.bias", "features.denseblock4.denselayer14.norm.1.running_mean", "features.denseblock4.denselayer14.norm.1.running_var", "features.denseblock4.denselayer14.conv.1.weight", "features.denseblock4.denselayer14.norm.2.weight", "features.denseblock4.denselayer14.norm.2.bias", "features.denseblock4.denselayer14.norm.2.running_mean", "features.denseblock4.denselayer14.norm.2.running_var", "features.denseblock4.denselayer14.conv.2.weight", "features.denseblock4.denselayer15.norm.1.weight", "features.denseblock4.denselayer15.norm.1.bias", "features.denseblock4.denselayer15.norm.1.running_mean", "features.denseblock4.denselayer15.norm.1.running_var", "features.denseblock4.denselayer15.conv.1.weight", "features.denseblock4.denselayer15.norm.2.weight", "features.denseblock4.denselayer15.norm.2.bias", "features.denseblock4.denselayer15.norm.2.running_mean", "features.denseblock4.denselayer15.norm.2.running_var", "features.denseblock4.denselayer15.conv.2.weight", "features.denseblock4.denselayer16.norm.1.weight", "features.denseblock4.denselayer16.norm.1.bias", "features.denseblock4.denselayer16.norm.1.running_mean", "features.denseblock4.denselayer16.norm.1.running_var", "features.denseblock4.denselayer16.conv.1.weight", "features.denseblock4.denselayer16.norm.2.weight", "features.denseblock4.denselayer16.norm.2.bias", "features.denseblock4.denselayer16.norm.2.running_mean", "features.denseblock4.denselayer16.norm.2.running_var", "features.denseblock4.denselayer16.conv.2.weight", "features.denseblock4.denselayer17.norm.1.weight", "features.denseblock4.denselayer17.norm.1.bias", "features.denseblock4.denselayer17.norm.1.running_mean", "features.denseblock4.denselayer17.norm.1.running_var", "features.denseblock4.denselayer17.conv.1.weight", "features.denseblock4.denselayer17.norm.2.weight", "features.denseblock4.denselayer17.norm.2.bias", "features.denseblock4.denselayer17.norm.2.running_mean", "features.denseblock4.denselayer17.norm.2.running_var", "features.denseblock4.denselayer17.conv.2.weight", "features.denseblock4.denselayer18.norm.1.weight", "features.denseblock4.denselayer18.norm.1.bias", "features.denseblock4.denselayer18.norm.1.running_mean", "features.denseblock4.denselayer18.norm.1.running_var", "features.denseblock4.denselayer18.conv.1.weight", "features.denseblock4.denselayer18.norm.2.weight", "features.denseblock4.denselayer18.norm.2.bias", "features.denseblock4.denselayer18.norm.2.running_mean", "features.denseblock4.denselayer18.norm.2.running_var", "features.denseblock4.denselayer18.conv.2.weight", "features.denseblock4.denselayer19.norm.1.weight", "features.denseblock4.denselayer19.norm.1.bias", "features.denseblock4.denselayer19.norm.1.running_mean", "features.denseblock4.denselayer19.norm.1.running_var", "features.denseblock4.denselayer19.conv.1.weight", "features.denseblock4.denselayer19.norm.2.weight", "features.denseblock4.denselayer19.norm.2.bias", "features.denseblock4.denselayer19.norm.2.running_mean", "features.denseblock4.denselayer19.norm.2.running_var", "features.denseblock4.denselayer19.conv.2.weight", "features.denseblock4.denselayer20.norm.1.weight", "features.denseblock4.denselayer20.norm.1.bias", "features.denseblock4.denselayer20.norm.1.running_mean", "features.denseblock4.denselayer20.norm.1.running_var", "features.denseblock4.denselayer20.conv.1.weight", "features.denseblock4.denselayer20.norm.2.weight", "features.denseblock4.denselayer20.norm.2.bias", "features.denseblock4.denselayer20.norm.2.running_mean", "features.denseblock4.denselayer20.norm.2.running_var", "features.denseblock4.denselayer20.conv.2.weight", "features.denseblock4.denselayer21.norm.1.weight", "features.denseblock4.denselayer21.norm.1.bias", "features.denseblock4.denselayer21.norm.1.running_mean", "features.denseblock4.denselayer21.norm.1.running_var", "features.denseblock4.denselayer21.conv.1.weight", "features.denseblock4.denselayer21.norm.2.weight", "features.denseblock4.denselayer21.norm.2.bias", "features.denseblock4.denselayer21.norm.2.running_mean", "features.denseblock4.denselayer21.norm.2.running_var", "features.denseblock4.denselayer21.conv.2.weight", "features.denseblock4.denselayer22.norm.1.weight", "features.denseblock4.denselayer22.norm.1.bias", "features.denseblock4.denselayer22.norm.1.running_mean", "features.denseblock4.denselayer22.norm.1.running_var", "features.denseblock4.denselayer22.conv.1.weight", "features.denseblock4.denselayer22.norm.2.weight", "features.denseblock4.denselayer22.norm.2.bias", "features.denseblock4.denselayer22.norm.2.running_mean", "features.denseblock4.denselayer22.norm.2.running_var", "features.denseblock4.denselayer22.conv.2.weight", "features.denseblock4.denselayer23.norm.1.weight", "features.denseblock4.denselayer23.norm.1.bias", "features.denseblock4.denselayer23.norm.1.running_mean", "features.denseblock4.denselayer23.norm.1.running_var", "features.denseblock4.denselayer23.conv.1.weight", "features.denseblock4.denselayer23.norm.2.weight", "features.denseblock4.denselayer23.norm.2.bias", "features.denseblock4.denselayer23.norm.2.running_mean", "features.denseblock4.denselayer23.norm.2.running_var", "features.denseblock4.denselayer23.conv.2.weight", "features.denseblock4.denselayer24.norm.1.weight", "features.denseblock4.denselayer24.norm.1.bias", "features.denseblock4.denselayer24.norm.1.running_mean", "features.denseblock4.denselayer24.norm.1.running_var", "features.denseblock4.denselayer24.conv.1.weight", "features.denseblock4.denselayer24.norm.2.weight", "features.denseblock4.denselayer24.norm.2.bias", "features.denseblock4.denselayer24.norm.2.running_mean", "features.denseblock4.denselayer24.norm.2.running_var", "features.denseblock4.denselayer24.conv.2.weight", "ASPP_3.conv.1.weight", "ASPP_3.conv.1.bias", "ASPP_3.norm.2.weight", "ASPP_3.norm.2.bias", "ASPP_3.norm.2.running_mean", "ASPP_3.norm.2.running_var", "ASPP_3.conv.2.weight", "ASPP_3.conv.2.bias", "ASPP_6.norm.1.weight", "ASPP_6.norm.1.bias", "ASPP_6.norm.1.running_mean", "ASPP_6.norm.1.running_var", "ASPP_6.conv.1.weight", "ASPP_6.conv.1.bias", "ASPP_6.norm.2.weight", "ASPP_6.norm.2.bias", "ASPP_6.norm.2.running_mean", "ASPP_6.norm.2.running_var", "ASPP_6.conv.2.weight", "ASPP_6.conv.2.bias", "ASPP_12.norm.1.weight", "ASPP_12.norm.1.bias", "ASPP_12.norm.1.running_mean", "ASPP_12.norm.1.running_var", "ASPP_12.conv.1.weight", "ASPP_12.conv.1.bias", "ASPP_12.norm.2.weight", "ASPP_12.norm.2.bias", "ASPP_12.norm.2.running_mean", "ASPP_12.norm.2.running_var", "ASPP_12.conv.2.weight", "ASPP_12.conv.2.bias", "ASPP_18.norm.1.weight", "ASPP_18.norm.1.bias", "ASPP_18.norm.1.running_mean", "ASPP_18.norm.1.running_var", "ASPP_18.conv.1.weight", "ASPP_18.conv.1.bias", "ASPP_18.norm.2.weight", "ASPP_18.norm.2.bias", "ASPP_18.norm.2.running_mean", "ASPP_18.norm.2.running_var", "ASPP_18.conv.2.weight", "ASPP_18.conv.2.bias", "ASPP_24.norm.1.weight", "ASPP_24.norm.1.bias", "ASPP_24.norm.1.running_mean", "ASPP_24.norm.1.running_var", "ASPP_24.conv.1.weight", "ASPP_24.conv.1.bias", "ASPP_24.norm.2.weight", "ASPP_24.norm.2.bias", "ASPP_24.norm.2.running_mean", "ASPP_24.norm.2.running_var", "ASPP_24.conv.2.weight", "ASPP_24.conv.2.bias".

why all weights r unexpected?

@hali1122
Copy link

i meet the same error as you ,did you solve this problem? thx

@DomainFlag
Copy link

DomainFlag commented Mar 16, 2021

For anyone that is stuck, use the modified version that may help much:

Inference.py

with the (basically a few remapping is needed for the weight state), and don't forget to import re at the top of the file:

@staticmethod
def __load_weight(seg_model, model_path):
    print("LOADING WEIGHTS.")
    weight = torch.load(model_path, map_location=lambda storage, loc: storage)

    new_state_dict = OrderedDict()
    for k, v in weight.items():
        # remove "module." from keys
        name = k[7:]
        if "classification" not in name:
            name = re.sub(r'\.(\d)', r'\1', name)

        new_state_dict[name] = v

    seg_model.load_state_dict(new_state_dict)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants