Skip to content

Commit dab0859

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎test_net.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def parse_args():
259259
pred_boxes = clip_boxes(pred_boxes, im_info.data, 1)
260260
else:
261261
# Simply repeat the boxes, once for each class
262-
pred_boxes = np.tile(boxes, (1, scores.shape[1]))
262+
_ = torch.from_numpy(np.tile(boxes, (1, scores.shape[1])))
263+
pred_boxes = _.cuda() if args.cuda > 0 else _
263264

264265
pred_boxes /= data[1][0][2].item()
265266

0 commit comments

Comments
 (0)