预测是报错Error(s) in loading state_dict for SSD:
预测时报错:Error(s) in loading state_dict for SSD:
具体的
具体的
File "/home/ssd-pytorch-master/predict.py", line 12, in
具体的
RuntimeError: Error(s) in loading state_dict for SSD: size mismatch for conf.0.weight: copying a param with shape torch.Size([16, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([20, 512, 3, 3]). size mismatch for conf.0.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([20]). size mismatch for conf.1.weight: copying a param with shape torch.Size([24, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 1024, 3, 3]). size mismatch for conf.1.bias: copying a param with shape torch.Size([24]) from checkpoint, the shape in current model is torch.Size([30]). size mismatch for conf.2.weight: copying a param with shape torch.Size([24, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 512, 3, 3]). size mismatch for conf.2.bias: copying a param with shape torch.Size([24]) from checkpoint, the shape in current model is torch.Size([30]). size mismatch for conf.3.weight: copying a param with shape torch.Size([24, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 256, 3, 3]). size mismatch for conf.3.bias: copying a param with shape torch.Size([24]) from checkpoint, the shape in current model is torch.Size([30]). size mismatch for conf.4.weight: copying a param with shape torch.Size([16, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([20, 256, 3, 3]). size mismatch for conf.4.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([20]). size mismatch for conf.5.weight: copying a param with shape torch.Size([16, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([20, 256, 3, 3]). size mismatch for conf.5.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([20]).
num_classes还是classes_path没修改好噢
num_classes还是classes_path没修改好噢
问题解决,谢谢
怎么解决的兄弟,我跟你一样的问题