FCOS.Pytorch icon indicating copy to clipboard operation
FCOS.Pytorch copied to clipboard

Unexpected key(s) in state_dict: "fc.weight", "fc.bias".

Open chencheng1203 opened this issue 6 years ago • 2 comments

when training, in 'resnet.py' line 197, can not load weight

chencheng1203 avatar Jan 13 '20 13:01 chencheng1203

the official pre-trained weights of resnet contains fc layer that we don't need. Therefore, you can modify line 197 as below: model.load_state_dict(model_zoo.load_url(model_urls['resnet50']),strict=False)

VectXmy avatar Jan 13 '20 13:01 VectXmy

Thanks for reply!

chencheng1203 avatar Jan 13 '20 14:01 chencheng1203