- 博客(1)
- 收藏
- 关注
原创 解决yolov5错误:RuntimeError: result type Float can‘t be cast to the desired output type __int64
在运行yolov5 train.py时出现了这个错误\n\n解决方式:\n\n将loss.py中gain = torch.ones(7, device=targets.device)改为gain = torch.ones(7, device=targets.device).long()即可。原因是新版本的torch无法自动执行此转换,旧版本torch可以。
2023-12-03 00:06:08
2274
7
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人