Skip to content

Commit 98e84f4

Browse files
authored
Merge 9155879 into 27e9ede
2 parents 27e9ede + 9155879 commit 98e84f4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_ops/test_tensorrt.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ def test_nms():
123123
fp16_mode = False
124124
max_workspace_size = 1 << 30
125125
data = mmcv.load('./tests/data/batched_nms_data.pkl')
126-
boxes = data['boxes'].cuda()
127-
scores = data['scores'].cuda()
126+
boxes = torch.from_numpy(data['boxes']).cuda()
127+
scores = torch.from_numpy(data['scores']).cuda()
128128
nms = partial(nms, iou_threshold=0.7, offset=0)
129129
wrapped_model = WrapFunction(nms)
130130
wrapped_model.cpu().eval()
@@ -195,9 +195,9 @@ def test_batched_nms():
195195
max_workspace_size = 1 << 30
196196
data = mmcv.load('./tests/data/batched_nms_data.pkl')
197197
nms_cfg = dict(type='nms', iou_threshold=0.7)
198-
boxes = data['boxes'].cuda()
199-
scores = data['scores'].cuda()
200-
idxs = data['idxs'].cuda()
198+
boxes = torch.from_numpy(data['boxes']).cuda()
199+
scores = torch.from_numpy(data['scores']).cuda()
200+
idxs = torch.from_numpy(data['idxs']).cuda()
201201
class_agnostic = False
202202

203203
nms = partial(batched_nms, nms_cfg=nms_cfg, class_agnostic=class_agnostic)

0 commit comments

Comments
 (0)