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

is there some model adjustment in it? #11

Open
ayj12345 opened this issue Aug 23, 2019 · 8 comments
Open

is there some model adjustment in it? #11

ayj12345 opened this issue Aug 23, 2019 · 8 comments

Comments

@ayj12345
Copy link

ayj12345 commented Aug 23, 2019

RuntimeError: Error(s) in loading state_dict for HorizonNet:
Missing key(s) in state_dict: "feature_extractor.encoder.conv1.1.weight", "feature_extractor.encoder.bn1.weight", "feature_extractor.encoder.bn1.bias", "feature_extractor.encoder.bn1.running_mean", "feature_extractor.encoder.bn1.running_var", "feature_extractor.encoder.layer1.0.conv1.weight", "feature_extractor.encoder.layer1.0.bn1.weight", "feature_extractor.encoder.layer1.0.bn1.bias", "feature_extractor.encoder.layer1.0.bn1.running_mean", "feature_extractor.encoder.layer1.0.bn1.running_var", "feature_extractor.encoder.layer1.0.conv2.1.weight", "feature_extractor.encoder.layer1.0.bn2.weight", "feature_extractor.encoder.layer1.0.bn2.bias", "feature_extractor.encoder.layer1.0.bn2.running_mean", "feature_extractor.encoder.layer1.0.bn2.running_var",
...
Unexpected key(s) in state_dict: "stage1.0.layer.1.weight", "stage1.0.layer.1.bias", "stage1.0.layer.2.weight", "stage1.0.layer.2.bias", "stage1.0.layer.2.running_mean", "stage1.0.layer.2.running_var", "stage1.0.layer.2.num_batches_tracked", "stage1.0.layer.5.weight", "stage1.0.layer.5.bias", "stage1.0.layer.6.weight", "stage1.0.layer.6.bias", "stage1.0.layer.6.running_mean", "stage1.0.layer.6.running_var", "stage1.0.layer.6.num_batches_tracked", "stage1.0.layer.9.weight", "stage1.0.layer.9.bias",
...

@ayj12345
Copy link
Author

I added strict=False attribute to load_state_dict(). But the demo not work well.
net.load_state_dict(state_dict['state_dict'], strict=False)`

@sunset1995
Copy link
Owner

Hi,
I have updated the code a lot which causes the key mismatch between current implementation and the original trained one.
I'm going to train again and release the new weight by this week.

@sunset1995
Copy link
Owner

The strict=False doesn't work is expected as it will be just random initialization.

@ayj12345
Copy link
Author

Hi,
I have updated the code a lot which causes the key mismatch between current implementation and the original trained one.
I'm going to train again and release the new weight by this week.

Thank you for your prompt reply. This interesting work is great helpful for me!

@robbiedood
Copy link

Got the same issue on Missing key(s) in state_dict. Look forward to the update.
Thank you.

@sunset1995
Copy link
Owner

Sorry, I'm super busy now 😭
A few more days plz.

@sunset1995
Copy link
Owner

I have just updated.
list of pretrained model

@robbiedood
Copy link

The issue has been resolved after the update. Brilliant, thank you !

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

3 participants