lzx1413 / PytorchSSD

pytorch version of SSD and it's enhanced methods such as RFBSSD,FSSD and RefineDet
MIT License
708 stars 237 forks source link

KeyError: 'unexpected key "0.weight" in state_dict' #18

Open charan223 opened 6 years ago

charan223 commented 6 years ago

Error while training RBF_mobile version

Loading base network... Traceback (most recent call last): File "train_test.py", line 133, in net.base.load_state_dict(base_weights) File "/home/xxxxx/anaconda2/envs/pyssd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 490, in load_state_dict .format(name)) KeyError: 'unexpected key "0.weight" in state_dict'

lzx1413 commented 6 years ago

The pre-train weight of the base model in RFB-mobile is not same as FSSD-mobile, you should use the corresponding pre-train weight.