Skip to content

Commit

Permalink
fix ONNXRuntime cuda test bug (open-mmlab#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
NagatoYuki0943 committed May 7, 2022
1 parent 86ab063 commit 5231e65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mmdeploy/codebase/mmdet/deploy/object_detection_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def forward(self, img: Sequence[torch.Tensor], img_metas: Sequence[dict],
rescale = kwargs.get('rescale', True)
for i in range(batch_size):
dets, labels = batch_dets[i], batch_labels[i]
dets = dets.to(device=torch.device(self.device))
if rescale:
scale_factor = img_metas[i]['scale_factor']

Expand Down

0 comments on commit 5231e65

Please sign in to comment.