microsoft / RegionCLIP

[CVPR 2022] Official code for "RegionCLIP: Region-based Language-Image Pretraining"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

runtime_error, when MODEL.ROI_HEADS.SOFT_NMS_ENABLED is True.

Hiram1026 opened this issue · comments

When MODEL.ROI_HEADS.SOFT_NMS_ENABLED is True, executing test_transfer_learning.sh produces a runtime error. When MODEL.ROI_HEADS.SOFT_NMS_ENABLED uses the default, the program is OK.

File "/home/hiram/workshop/paper2/RegionCLIP/detectron2/layers/soft_nms.py", line 130, in batched_soft_nms
return soft_nms(
File "/home/hiram/workshop/paper2/RegionCLIP/detectron2/layers/soft_nms.py", line 35, in soft_nms
return _soft_nms(
File "/home/hiram/workshop/paper2/RegionCLIP/detectron2/layers/soft_nms.py", line 259, in _soft_nms
idxs = idxs[keep]
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (CPU)

已解决 pytorch版本2.0出现了这个问题,退版本解决