From 7102f227252ddf86d20aa6ce9e6217b121fe71c2 Mon Sep 17 00:00:00 2001 From: Li Yuanming Date: Tue, 5 Mar 2019 17:45:05 +0800 Subject: [PATCH] fix bug fix run into exceptions when __C.TEST.BBOX_REG = False --- demo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo.py b/demo.py index b1fc36b..6145deb 100644 --- a/demo.py +++ b/demo.py @@ -321,7 +321,8 @@ if __name__ == '__main__': pred_boxes = clip_boxes(pred_boxes, im_info.data, 1) else: # Simply repeat the boxes, once for each class - pred_boxes = np.tile(boxes, (1, scores.shape[1])) + _ = torch.from_numpy(np.tile(boxes, (1, scores.shape[1]))) + pred_boxes = _.cuda() if args.cuda > 0 else _ pred_boxes /= im_scales[0] -- GitLab