PytorchSSD
PytorchSSD copied to clipboard
Unexpected key(s) in state_dict: L2Norm.weight
Hi, I tried to using FSSD in live.py by adding the following code:
elif args.version == 'FSSD_vgg':
from models.FSSD_vgg import build_net
And I have downloaded the pretrained model FSSD_vgg_VOC_epoches_270.pth,but here comes the error:
RuntimeError: Error(s) in loading state_dict for FSSD:
Unexpected key(s) in state_dict: "L2Norm.weight".
How could I solve it?
replace net.load_state_dict(new_state_dict) with net.load_state_dict(new_state_dict, strict=False) in the train_test.py works for me
replace
net.load_state_dict(new_state_dict)withnet.load_state_dict(new_state_dict, strict=False)in the train_test.py works for me
Thanks for your advice !