xialuxi / yolov5-car-plate

基于yolov5的车牌检测,包含车牌角点检测
GNU General Public License v3.0
154 stars 40 forks source link

训练出错 #13

Closed Aruen24 closed 2 years ago

Aruen24 commented 2 years ago

Traceback (most recent call last): File "train.py", line 552, in train(hyp, opt, device, tb_writer) File "train.py", line 159, in train ema.ema.load_state_dict(ckpt['ema'].float().state_dict()) File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for Model: size mismatch for model.24.m.0.weight: copying a param with shape torch.Size([42, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 128, 1, 1]). size mismatch for model.24.m.0.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]). size mismatch for model.24.m.1.weight: copying a param with shape torch.Size([42, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 256, 1, 1]). size mismatch for model.24.m.1.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]). size mismatch for model.24.m.2.weight: copying a param with shape torch.Size([42, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 512, 1, 1]). size mismatch for model.24.m.2.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]).

Aruen24 commented 2 years ago

Traceback (most recent call last): File "train.py", line 552, in train(hyp, opt, device, tb_writer) File "train.py", line 159, in train ema.ema.load_state_dict(ckpt['ema'].float().state_dict()) File "/home/wyw/.conda/envs/py36_torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for Model: size mismatch for model.24.m.0.weight: copying a param with shape torch.Size([42, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 128, 1, 1]). size mismatch for model.24.m.0.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]). size mismatch for model.24.m.1.weight: copying a param with shape torch.Size([42, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 256, 1, 1]). size mismatch for model.24.m.1.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]). size mismatch for model.24.m.2.weight: copying a param with shape torch.Size([42, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([45, 512, 1, 1]). size mismatch for model.24.m.2.bias: copying a param with shape torch.Size([42]) from checkpoint, the shape in current model is torch.Size([45]).