最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

YOLOv5训练报错:indices.append((b, a, gj.clamp

网站源码admin8浏览0评论

YOLOv5训练报错:indices.append((b, a, gj.clamp

YOLOv5训练报错:indices.append((b, a, gj.clamp

报错:

build target 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


源代码:

gain = torch.ones(7, device = device)

在loss.py文件里


解决方案:

gain = torch.ones(7, device = device).long()

在loss.py文件里修改

发布评论

评论列表(0)

  1. 暂无评论