We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to run the code. Got the error
KeyError: 'base.conv1.weight' in backbone file.
KeyError: 'base.conv1.weight'
Have any idea to solve this?
Thank you.
The text was updated successfully, but these errors were encountered:
多GPU训练保存的参数单GPU的环境无法直接用
Sorry, something went wrong.
多GPU训练保存的参数单GPU的环境无法直接用 您好,这个解决不了吗
As I can't use Baidu account, I downloaded the pretrained model from here. Then, I got the same problem.
I found out that the pretrained model file has different layer names with this repository. So, I fixed the code block a bit and it worked!
Go to .../model/backbones/resnet.py and I changed def load_param(self, model_path) block like:
.../model/backbones/resnet.py
def load_param(self, model_path)
def load_param(self, model_path): param_dict = torch.load(model_path) for i in param_dict: j = i.replace("base.","") if 'fc' in i: continue if j in self.state_dict().keys(): self.state_dict()[j].copy_(param_dict[i])
No branches or pull requests
Trying to run the code. Got the error
KeyError: 'base.conv1.weight'
in backbone file.Have any idea to solve this?
Thank you.
The text was updated successfully, but these errors were encountered: