-
Notifications
You must be signed in to change notification settings - Fork 55
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
trained model are not working #13
Comments
I have the same error |
Add strict=False attribute to load_state_dict().
|
You can replace the following code:
with:
|
Please, can you advice what I might be doing wrong?
I am trying to run the eval script, I changed the path to the saved weigths but I am getting this:
RuntimeError: Error(s) in loading state_dict for EncoderNet:
Missing key(s) in state_dict: "conv.weight", "conv.bias", "bn.weight", "bn.bias", "bn.running_mean", "bn.running_var", "en_layer1.0.conv1.weight", "en_layer1.0.conv1.bias", "en_layer1.0.bn1.weight", "en_layer1.0.bn1.bias", "en_layer1.0.bn1.running_mean", "en_layer1.0.bn1.running_var", "en_layer1.0.conv2.weight", "en_layer1.0.conv2.bias", "en_layer1.0.bn2.weight", "en_layer1.0.bn2.bias", "en_layer1.0.bn2.running_mean", "en_layer1.0.bn2.running_var", "en_layer2.0.conv1.weight", "en_layer2.0.conv1.bias", "en_layer2.0.bn1.weight", "en_layer2.0.bn1.bias", "en_layer2.0.bn1.running_mean", "en_layer2.0.bn1.running_var", "en_layer2.0.conv2.weight", "en_layer2.0.conv2.bias", "en_layer2.0.bn2.weight", "en_layer2.0.bn2.bias", "en_layer2.0.bn2.running_mean", "en_layer2.0.bn2.running_var", "en_layer2.0.downsample.0.weight", "en_layer2.0.downsample.0.bias", "en_layer2.0.downsample.1.weight", "en_layer2.0.downsample.1.bias", "en_layer2.0.downsample.1.running_mean", "en_layer2.0.downsample.1.running_var", "en_layer3.0.conv1.weight", "en_layer3.0.conv1.bias", "en_layer3.0.bn1.weight", "en_layer3.0.bn1.bias", "en_layer3.0.bn1.running_mean", "en_layer3.0.bn1.running_var", "en_layer3.0.conv2.weight", "en_layer3.0.conv2.bias", "en_layer3.0.bn2.weight", "en_layer3.0.bn2.bias", "en_layer3.0.bn2.running_mean", "en_layer3.0.bn2.running_var", "en_layer3.0.downsample.0.weight", "en_layer3.0.downsample.0.bias", "en_layer3.0.downsample.1.weight", "en_layer3.0.downsample.1.bias", "en_layer3.0.downsample.1.running_mean", "en_layer3.0.downsample.1.running_var", "en_layer4.0.conv1.weight", "en_layer4.0.conv1.bias", "en_layer4.0.bn1.weight", "en_layer4.0.bn1.bias", "en_layer4.0.bn1.running_mean", "en_layer4.0.bn1.running_var", "en_layer4.0.conv2.weight", "en_layer4.0.conv2.bias", "en_layer4.0.bn2.weight", "en_layer4.0.bn2.bias", "en_layer4.0.bn2.running_mean", "en_layer4.0.bn2.running_var", "en_layer4.0.downsample.0.weight", "en_layer4.0.downsample.0.bias", "en_layer4.0.downsample.1.weight", "en_layer4.0.downsample.1.bias", "en_layer4.0.downsample.1.running_mean", "en_layer4.0.downsample.1.running_var", "en_layer5.0.conv1.weight", "en_layer5.0.conv1.bias", "en_layer5.0.bn1.weight", "en_layer5.0.bn1.bias", "en_layer5.0.bn1.running_mean", "en_layer5.0.bn1.running_var", "en_layer5.0.conv2.weight", "en_layer5.0.conv2.bias", "en_layer5.0.bn2.weight", "en_layer5.0.bn2.bias", "en_layer5.0.bn2.running_mean", "en_layer5.0.bn2.running_var", "en_layer5.0.downsample.0.weight", "en_layer5.0.downsample.0.bias", "en_layer5.0.downsample.1.weight", "en_layer5.0.downsample.1.bias", "en_layer5.0.downsample.1.running_mean", "en_layer5.0.downsample.1.running_var", "en_layer5.1.conv1.weight", "en_layer5.1.conv1.bias", "en_layer5.1.bn1.weight", "en_layer5.1.bn1.bias", "en_layer5.1.bn1.running_mean", "en_layer5.1.bn1.running_var", "en_layer5.1.conv2.weight", "en_layer5.1.conv2.bias", "en_layer5.1.bn2.weight", "en_layer5.1.bn2.bias", "en_layer5.1.bn2.running_mean", "en_layer5.1.bn2.running_var".
Unexpected key(s) in state_dict: "module.conv.weight", "module.conv.bias", "module.bn.weight", "module.bn.bias", "module.bn.running_mean", "module.bn.running_var", "module.en_layer1.0.conv1.weight", "module.en_layer1.0.conv1.bias", "module.en_layer1.0.bn1.weight", "module.en_layer1.0.bn1.bias", "module.en_layer1.0.bn1.running_mean", "module.en_layer1.0.bn1.running_var", "module.en_layer1.0.conv2.weight", "module.en_layer1.0.conv2.bias", "module.en_layer1.0.bn2.weight", "module.en_layer1.0.bn2.bias", "module.en_layer1.0.bn2.running_mean", "module.en_layer1.0.bn2.running_var", "module.en_layer2.0.conv1.weight", "module.en_layer2.0.conv1.bias", "module.en_layer2.0.bn1.weight", "module.en_layer2.0.bn1.bias", "module.en_layer2.0.bn1.running_mean", "module.en_layer2.0.bn1.running_var", "module.en_layer2.0.conv2.weight", "module.en_layer2.0.conv2.bias", "module.en_layer2.0.bn2.weight", "module.en_layer2.0.bn2.bias", "module.en_layer2.0.bn2.running_mean", "module.en_layer2.0.bn2.running_var", "module.en_layer2.0.downsample.0.weight", "module.en_layer2.0.downsample.0.bias", "module.en_layer2.0.downsample.1.weight", "module.en_layer2.0.downsample.1.bias", "module.en_layer2.0.downsample.1.running_mean", "module.en_layer2.0.downsample.1.running_var", "module.en_layer3.0.conv1.weight", "module.en_layer3.0.conv1.bias", "module.en_layer3.0.bn1.weight", "module.en_layer3.0.bn1.bias", "module.en_layer3.0.bn1.running_mean", "module.en_layer3.0.bn1.running_var", "module.en_layer3.0.conv2.weight", "module.en_layer3.0.conv2.bias", "module.en_layer3.0.bn2.weight", "module.en_layer3.0.bn2.bias", "module.en_layer3.0.bn2.running_mean", "module.en_layer3.0.bn2.running_var", "module.en_layer3.0.downsample.0.weight", "module.en_layer3.0.downsample.0.bias", "module.en_layer3.0.downsample.1.weight", "module.en_layer3.0.downsample.1.bias", "module.en_layer3.0.downsample.1.running_mean", "module.en_layer3.0.downsample.1.running_var", "module.en_layer4.0.conv1.weight", "module.en_layer4.0.conv1.bias", "module.en_layer4.0.bn1.weight", "module.en_layer4.0.bn1.bias", "module.en_layer4.0.bn1.running_mean", "module.en_layer4.0.bn1.running_var", "module.en_layer4.0.conv2.weight", "module.en_layer4.0.conv2.bias", "module.en_layer4.0.bn2.weight", "module.en_layer4.0.bn2.bias", "module.en_layer4.0.bn2.running_mean", "module.en_layer4.0.bn2.running_var", "module.en_layer4.0.downsample.0.weight", "module.en_layer4.0.downsample.0.bias", "module.en_layer4.0.downsample.1.weight", "module.en_layer4.0.downsample.1.bias", "module.en_layer4.0.downsample.1.running_mean", "module.en_layer4.0.downsample.1.running_var", "module.en_layer5.0.conv1.weight", "module.en_layer5.0.conv1.bias", "module.en_layer5.0.bn1.weight", "module.en_layer5.0.bn1.bias", "module.en_layer5.0.bn1.running_mean", "module.en_layer5.0.bn1.running_var", "module.en_layer5.0.conv2.weight", "module.en_layer5.0.conv2.bias", "module.en_layer5.0.bn2.weight", "module.en_layer5.0.bn2.bias", "module.en_layer5.0.bn2.running_mean", "module.en_layer5.0.bn2.running_var", "module.en_layer5.0.downsample.0.weight", "module.en_layer5.0.downsample.0.bias", "module.en_layer5.0.downsample.1.weight", "module.en_layer5.0.downsample.1.bias", "module.en_layer5.0.downsample.1.running_mean", "module.en_layer5.0.downsample.1.running_var", "module.en_layer5.1.conv1.weight", "module.en_layer5.1.conv1.bias", "module.en_layer5.1.bn1.weight", "module.en_layer5.1.bn1.bias", "module.en_layer5.1.bn1.running_mean", "module.en_layer5.1.bn1.running_var", "module.en_layer5.1.conv2.weight", "module.en_layer5.1.conv2.bias", "module.en_layer5.1.bn2.weight", "module.en_layer5.1.bn2.bias", "module.en_layer5.1.bn2.running_mean", "module.en_layer5.1.bn2.running_var".
The text was updated successfully, but these errors were encountered: