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文件里修改

发布者:admin,转转请注明出处:http://www.yc00.com/web/1730916051a3578617.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信