when I use my trained model in the demo.py, it has the error:
RuntimeError: Error(s) in loading state_dict for SSD:
size mismatch for conf.0.weight: copying a param with shape torch.Size([8, 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([8]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for conf.1.weight: copying a param with shape torch.Size([12, 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([12]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.2.weight: copying a param with shape torch.Size([12, 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([12]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.3.weight: copying a param with shape torch.Size([12, 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([12]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.4.weight: copying a param with shape torch.Size([8, 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([8]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for conf.5.weight: copying a param with shape torch.Size([8, 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([8]) from checkpoint, the shape in current mode
Do you know how to fix it?
Have fixed: net = build_ssd('test', 300, 2) # initialize SSD
@sxyxf66 I am having the same issue. Could you please help me with what to do to avoid it? I am not quite understanding what you mean with the comment on your fix.

I am using this https://github.com/dusty-nv/jetson-inference.
Most helpful comment
Have fixed: net = build_ssd('test', 300, 2) # initialize SSD