loss.py:result type Float can't be cast to the desired output type long int
Epoch gpu_mem box obj cls labels img_size
0%| | 0/1 [00:01
main(opt)
File "/home/data/yolov5-6.1/train.py", line 539, in main
train(opt.hyp, opt, device, callbacks)
File "/home/data/yolov5-6.1/train.py", line 331, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "/home/data/yolov5-6.1/utils/loss.py", line 120, in __call__
tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets
File "/home/data/yolov5-6.1/utils/loss.py", line 217, in build_targets
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type long int
处理方式:https://blog.csdn.net/Thebest_jack/article/details/125649451
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述