XiaLiPKU / EMANet

The code for Expectation-Maximization Attention Networks for Semantic Segmentation (ICCV'2019 Oral)

Home Page:https://xialipku.github.io/publication/expectation-maximization-attention-networks-for-semantic-segmentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: self.net.module.load_state_dict(obj['net'])

taotaoyuhust opened this issue · comments

using the pretrained model throw out this error:

RuntimeError: Error(s) in loading state_dict for EMANet:
Missing key(s) in state_dict: "extractor.4.0.conv1.weight", "extractor.4.0.bn1.weight", "extractor.4.0.bn1.bias", "extractor.4.0.bn1.running_mean", "extractor.4.0.bn1.running_var", "extractor.4.0.conv2.weight", ......
Unexpected key(s) in state_dict: "layer1.0.0.conv1.weight", "layer1.0.0.bn1.weight", "layer1.0.0.b

someone can help?

Sorry, I forgot to change the keys' names

3x for reply, so how to solve it?

I will upload a usable pth sooner.

commented

@XiaLiPKU
hello author,
Thank you for your work, I want to ask you a question ,your EMAnet is used segment, if I am use in classification task .What do you think of the effect? If it is necessary to try , the emau structure need to change?

same problem here

it occurs to me:
RuntimeError: Error(s) in loading state_dict for EMANet:
Unexpected key(s) in state_dict: "extractor.6.0.conv1.weight", "extractor.6.0.bn1.weight", "extractor.6.0.bn1.bias", "extractor.6.0.bn1.running_mean", "extractor.6.0.bn1.running_var", "extractor.6.0.bn1.num_batches_tracked", "extractor.6.0.conv2.weight", "e

using the pretrained model throw out this error:

RuntimeError: Error(s) in loading state_dict for EMANet:
Missing key(s) in state_dict: "extractor.4.0.conv1.weight", "extractor.4.0.bn1.weight", "extractor.4.0.bn1.bias", "extractor.4.0.bn1.running_mean", "extractor.4.0.bn1.running_var", "extractor.4.0.conv2.weight", ......
Unexpected key(s) in state_dict: "layer1.0.0.conv1.weight", "layer1.0.0.bn1.weight", "layer1.0.0.b

someone can help?

Now, I have updated the pretrained model and the link.
You can download it again and direct use it in your code

it occurs to me:
RuntimeError: Error(s) in loading state_dict for EMANet:
Unexpected key(s) in state_dict: "extractor.6.0.conv1.weight", "extractor.6.0.bn1.weight", "extractor.6.0.bn1.bias", "extractor.6.0.bn1.running_mean", "extractor.6.0.bn1.running_var", "extractor.6.0.bn1.num_batches_tracked", "extractor.6.0.conv2.weight", "e

Now I have updated the pth file. Please download it again.