Skip to content
Snippets Groups Projects
Unverified Commit 5d7eec58 authored by Jerry Jiarui XU's avatar Jerry Jiarui XU Committed by GitHub
Browse files

remove new_tensor (#2092)

parent ef58bc62
No related branches found
No related tags found
No related merge requests found
......@@ -110,8 +110,9 @@ def soft_nms(dets, iou_thr, method='linear', sigma=0.5, min_score=1e-3):
inds = results[:, 5]
if is_tensor:
return dets.new_tensor(new_dets), dets.new_tensor(
inds, dtype=torch.long)
return new_dets.to(
device=dets.device, dtype=dets.dtype), inds.to(
device=dets.device, dtype=torch.long)
else:
return new_dets.numpy().astype(dets.dtype), inds.numpy().astype(
np.int64)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment