RuntimeError: Input type (float) and bias type (c10::Half) should be the same

YOLOv5训练报错RuntimeError: Input type (float) and bias type (c10::Half) should be the same

截图如下
RuntimeError: Input type (float) and bias type (c10::Half) should be the same_第1张图片
修改方法如下:
RuntimeError: Input type (float) and bias type (c10::Half) should be the same_第2张图片
训练时在model.half()前加入half=flase即可

你可能感兴趣的:(计算机视觉,人工智能,YOLO)