File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,8 @@ def _get_image_blob(im):
321
321
pred_boxes = clip_boxes (pred_boxes , im_info .data , 1 )
322
322
else :
323
323
# 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 _
325
326
326
327
pred_boxes /= im_scales [0 ]
327
328
Original file line number Diff line number Diff line change @@ -259,7 +259,8 @@ def parse_args():
259
259
pred_boxes = clip_boxes (pred_boxes , im_info .data , 1 )
260
260
else :
261
261
# 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 _
263
264
264
265
pred_boxes /= data [1 ][0 ][2 ].item ()
265
266
You can’t perform that action at this time.
0 commit comments