Key mismatch while loading the model?
See original GitHub issueI am having issue loading the trained checkpoint to FPNSSD512 model. How can I fix that?
RuntimeError: Error(s) in loading state_dict for FPNSSD512:
Missing key(s) in state_dict: "fpn.conv1.weight", "fpn.bn1.running_var", "fpn.bn1.bias", "fpn.bn1.running_mean", "fpn.bn1.weight", "fpn.layer1.0.conv1.weight", "fpn.layer1.0.bn1.running_var", "fpn.layer1.0.bn1.bias", "fpn.layer1.0.bn1.running_mean", "fpn.layer1.0.bn1.weight", "fpn.layer1.0.conv2.weight", "fpn.layer1.0.bn2.running_var", "fpn.layer1.0.bn2.bias",
Unexpected key(s) in state_dict: "module.fpn.conv1.weight", "module.fpn.bn1.weight", "module.fpn.bn1.bias", "module.fpn.bn1.running_mean", "module.fpn.bn1.running_var", "module.fpn.layer1.0.conv1.weight"
Issue Analytics
- State:
- Created 5 years ago
- Comments:17
Top Results From Across the Web
How can i solve Foreign key mismatch error in django?
Find the migration file that has Field model, delete it, then run makemigrations again. The migrations file is in the migrations folder (the ......
Read more >RuntimeError: Error(s) in loading state_dict for DynamicUnet
Here, I aim to load the model and weights to run inference with new ... key(s) in state_dict: "layers.0.4.0.conv3.weight" | size mismatch ......
Read more >I get a message about data type mismatch - Microsoft Support
This error indicates that Access cannot match an input value to the data type it expects for the value. For example, if you...
Read more >Datasets not behaving as expected after random data ...
ValueError : Keys mismatch: between {'indices': Value(dtype='uint64', ... Before I train my model on several augmented datasets, I check and each dataset is ......
Read more >Keras load pre-trained weights. Shape mismatch
Apparently, there is a mismatch in architecture between model and the original model which was used to generate my_weights.h5 . Compare summary ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you want to load the weights after
DataParallel
use:net.module.load_state_dict(pertained_weights)
If you want to load the weights beforeDataParallel
use:net.load_state_dict(pertained_weights)
@ahkarami I uploaded the sgd training and eval log. And with sgd, I can only got aound 76% mAP now. The pretrained model was in here.