From b421afa508c8c28de414c0f364c47e4efb57b8db Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 27 Sep 2019 23:35:04 +0200 Subject: [PATCH] updates --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 31532d9f..8b820a97 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -479,7 +479,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5): # Select predicted classes class_conf = class_conf[i] - class_pred = class_pred[i].unsqueeze(1).float() + class_pred = class_pred[i].unsqueeze(1).type_as(class_conf) # Box (center x, center y, width, height) to (x1, y1, x2, y2) pred[:, :4] = xywh2xyxy(pred[:, :4])