Skip to content

Commit 7102f22

Browse files
committed
fix bug
fix run into exceptions when __C.TEST.BBOX_REG = False
1 parent 0f970d2 commit 7102f22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ def _get_image_blob(im):
321321
pred_boxes = clip_boxes(pred_boxes, im_info.data, 1)
322322
else:
323323
# Simply repeat the boxes, once for each class
324-
pred_boxes = np.tile(boxes, (1, scores.shape[1]))
324+
_ = torch.from_numpy(np.tile(boxes, (1, scores.shape[1])))
325+
pred_boxes = _.cuda() if args.cuda > 0 else _
325326

326327
pred_boxes /= im_scales[0]
327328

0 commit comments

Comments
 (0)