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

Missing key(s) in state_dict #26

Closed
y72428026 opened this issue Jun 30, 2021 · 3 comments
Closed

Missing key(s) in state_dict #26

y72428026 opened this issue Jun 30, 2021 · 3 comments

Comments

@y72428026
Copy link

y72428026 commented Jun 30, 2021

hello~Thanks for your excellent work, but now I meet a problem when I try to follow the steps in "Inference Using Pretrained Model"-"2) GTA -> Cityscapes". It throws a error:
RuntimeError: Error(s) in loading state_dict for ResNet101:
Missing key(s) in state_dict: "bn_pretrain.weight", "bn_pretrain.bias", "bn_pretrain.running_mean", "bn_pretrain.running_var".
image
if anyone meet the same error?

@JiangXiaobai00
Copy link

JiangXiaobai00 commented Sep 16, 2021

I also encounter this problem !

@ljjcoder
Copy link

I also encounter this problem ! Anyone fixed it?

@michaelku1
Copy link

the downloaded pretrained weights have those keys where your initialised model is missing, so you need to go to the line where stage1 model is initialised and add the bn_clr=opt.bn_clr to it, and then you will have to specify --bn_clr in your command line to flag bn_clr to True (bn_clr is a batchnorm layer)

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