From 9fbc8684e353fd07d22d39c6681fe2b44838e59e Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Mon, 13 Feb 2023 14:37:31 -0700 Subject: [PATCH] update based on https://github.com/Tianxiaomo/pytorch-YOLOv4/issues/553 --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 1eda27a4..6226e72d 100644 --- a/train.py +++ b/train.py @@ -208,7 +208,7 @@ def build_target(self, pred, labels, batchsize, fsize, n_ch, output_id): truth_box[:n, 0] = truth_x_all[b, :n] truth_box[:n, 1] = truth_y_all[b, :n] - pred_ious = bboxes_iou(pred[b].view(-1, 4), truth_box, xyxy=False) + pred_ious = bboxes_iou(pred[b].reshape(-1, 4), truth_box, xyxy=False) pred_best_iou, _ = pred_ious.max(dim=1) pred_best_iou = (pred_best_iou > self.ignore_thre) pred_best_iou = pred_best_iou.view(pred[b].shape[:3])