yolov7-tiny报错 RuntimeError: result type Float can‘t be cast to the desired output type __int64

训练yolov7-tiny-pytorch报错

RuntimeError: result type Float can‘t be cast to the desired output type __int64

[参考链接]((261条消息) YOLOV7训练问题的记录_卿月_的博客-CSDN博客)

找到yolo_training.py文件,把 里面的

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

更改为

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

猜你喜欢

转载自blog.csdn.net/njj15760675213/article/details/134169064
今日推荐