I encountered the same error when I ran the program. How can I solve this problem.
D:\Software\Anaconda3\envs\pytorch\python.exe D:/Python_project/SSD/demo/demo.py
Loading weights into state dict...
Traceback (most recent call last):
  File "D:/Python_project/SSD/demo/demo.py", line 22, in <module>
    net.load_weights('../weights/ssd300_mAP_77.43_v2.pth')
  File "D:\Python_project\SSD\ssd.py", line 121, in load_weights
    map_location=lambda storage, loc: storage))
  File "D:\Software\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 839, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SSD:
	size mismatch for conf.0.weight: copying a param with shape torch.Size([4, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 512, 3, 3]).
	size mismatch for conf.0.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([84]).
	size mismatch for conf.1.weight: copying a param with shape torch.Size([6, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 1024, 3, 3]).
	size mismatch for conf.1.bias: copying a param with shape torch.Size([6]) from checkpoint, the shape in current model is torch.Size([126]).
	size mismatch for conf.2.weight: copying a param with shape torch.Size([6, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 512, 3, 3]).
	size mismatch for conf.2.bias: copying a param with shape torch.Size([6]) from checkpoint, the shape in current model is torch.Size([126]).
	size mismatch for conf.3.weight: copying a param with shape torch.Size([6, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 256, 3, 3]).
	size mismatch for conf.3.bias: copying a param with shape torch.Size([6]) from checkpoint, the shape in current model is torch.Size([126]).
	size mismatch for conf.4.weight: copying a param with shape torch.Size([4, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 256, 3, 3]).
	size mismatch for conf.4.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([84]).
	size mismatch for conf.5.weight: copying a param with shape torch.Size([4, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 256, 3, 3]).
	size mismatch for conf.5.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([84]).

Process finished with exit code 1