RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
在loss.py中:
搜索"from_which_layer.append((torch.ones(size=(len(b),)) * i)"
替换为 “from_which_layer.append((torch.ones(size=(len(b),)) * i).to(‘cuda’))”,
搜索 “fg_mask_inboxes = matching_matrix.sum(0) > 0.0” 在后面添加一行"fg_mask_inboxes = fg_mask_inboxes.to(torch.device(‘cuda’))"
有很多处