RuntimeError: Error(s) in loading state_dict for YoloBody:
size mismatch for yolo_head_P3.weight: copying a param with shape torch.Size([18, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 256, 1, 1]).
size mismatch for yolo_head_P3.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]).
size mismatch for yolo_head_P4.weight: copying a param with shape torch.Size([18, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 512, 1, 1]).
size mismatch for yolo_head_P4.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]).
size mismatch for yolo_head_P5.weight: copying a param with shape torch.Size([18, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 1024, 1, 1]).
size mismatch for yolo_head_P5.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]).
训练完进行预测会出现这种情况
RuntimeError: Error(s) in loading state_dict for YoloBody: size mismatch for yolo_head_P3.weight: copying a param with shape torch.Size([18, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 256, 1, 1]). size mismatch for yolo_head_P3.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]). size mismatch for yolo_head_P4.weight: copying a param with shape torch.Size([18, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 512, 1, 1]). size mismatch for yolo_head_P4.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]). size mismatch for yolo_head_P5.weight: copying a param with shape torch.Size([18, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 1024, 1, 1]). size mismatch for yolo_head_P5.bias: copying a param with shape torch.Size([18]) from checkpoint, the shape in current model is torch.Size([255]). 训练完进行预测会出现这种情况