YOLOv7
代码库:GitHub - bubbliiiing/yolov7-pytorch: 这是一个yolov7的库,可以用于训练自己的数据集。
解决办法:
1.在yolo_training.py文件大约395行处加一行代码
fg_mask_inboxes = fg_mask_inboxes.to(torch.device('cuda'))
2.在yolo_training.py文件大约288行处改这一行代码
from_which_layer.append((torch.ones(size=(len(b),)) * i).to('cuda'))
即可解决
(学习记录)