yolov5-OTA 注意力 OTA--Optimal Transport Assignment

1.1若出现RuntimeError: shape mismatch: value tensor of shape 【2, 1】 cannot be broadcast to indexing result of shape 【2】

出现1.1的错误,也可以直接将报错的iou.detach()改成torch.squeeze(iou.detach())即可,通过debug找到问题点

你可能感兴趣的:(YOLO,1024程序员节)