AI视觉算法 目标检测

在使用pycharm+pytorch进行YOLOV3-spp进行预训练权重进行训练时出现报错
报错内容如下:
Traceback (most recent call last):
File "/home/zzy/PycharmProjects/deep-learning-for-image-processing-master/pytorch_object_detection/yolov3_spp/train_utils/train_eval_utils.py", line 61, in train_one_epoch
loss_dict = compute_loss(pred, targets, model)
File "/home/zzy/PycharmProjects/deep-learning-for-image-processing-master/pytorch_object_detection/yolov3_spp/build_utils/utils.py", line 213, in compute_loss
tcls, tbox, indices, anchors = build_targets(p, targets, model) # targets
File "/home/zzy/PycharmProjects/deep-learning-for-image-processing-master/pytorch_object_detection/yolov3_spp/build_utils/utils.py", line 297, in build_targets
a, t = at[j], t.repeat(na, 1, 1)[j] # filter
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

at = torch.arange(na, device=targets.device).view(na, 1).repeat(1, nt)

参考这两个·,有没有可能某些参数没加载到GPU上。
https://discuss.pytorch.org/t/indices-should-be-either-on-cpu-or-on-the-same-device-as-the-indexed-tensor/154141/3
https://github.com/huggingface/diffusers/issues/239