Yolov3: Error when testing map

Created on 11 Apr 2020  路  4Comments  路  Source: ultralytics/yolov3

Hi, when running first epoch:
File "train.py", line 424, in
train() # train normally
File "train.py", line 313, in train
dataloader=testloader)
File "yolov3/test.py", line 103, in test
output = non_max_suppression(inf_out, conf_thres=conf_thres, iou_thres=iou_thres) # nms
File "yolov3/utils/utils.py", line 562, in non_max_suppression
weights = (box_iou(boxes[i], boxes) > iou_thres) * scores[None] # box weights
RuntimeError: expected backend CUDA and dtype Float but got backend CUDA and dtype Byte

bug

Most helpful comment

@glenn-jocher Sorry for no explanation
I used PyTorch version 1.2.0.
I changed weights = (box_iou(boxes[i], boxes) > iou_thres) * scores[None] to
weights = (box_iou(boxes[i], boxes) > iou_thres).float() * scores[None] in yolov3/utils/utils.py", line 562.
it worked!

All 4 comments

Hello @NgTuong, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Google Colab Notebook, Docker Image, and GCP Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

@NgTuong this happened to some other users, but we have not been able to reproduce the issue. How were you able to solve it?

@glenn-jocher Sorry for no explanation
I used PyTorch version 1.2.0.
I changed weights = (box_iou(boxes[i], boxes) > iou_thres) * scores[None] to
weights = (box_iou(boxes[i], boxes) > iou_thres).float() * scores[None] in yolov3/utils/utils.py", line 562.
it worked!

@NgTuong ok got it, thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khalidw picture khalidw  路  5Comments

Aria20155 picture Aria20155  路  3Comments

kaaier picture kaaier  路  3Comments

Rajasekhar06 picture Rajasekhar06  路  3Comments

Blddwkb picture Blddwkb  路  4Comments