From b81c17aa9f1cd901c5be923bff68893bb5a9be3c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 8 Dec 2019 16:02:55 -0800 Subject: [PATCH] updates --- utils/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index a289ea55..c33ccc70 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -427,12 +427,11 @@ def build_targets(model, targets): a = torch.arange(na).view((-1, 1)).repeat([1, nt]).view(-1) t = targets.repeat([na, 1]) gwh = gwh.repeat([na, 1]) - iou = iou.view(-1) # use all ious # reject anchors below iou_thres (OPTIONAL, increases P, lowers R) reject = True if reject: - j = iou > model.hyp['iou_t'] # iou threshold hyperparameter + j = iou.view(-1) > model.hyp['iou_t'] # iou threshold hyperparameter t, a, gwh = t[j], a[j], gwh[j] # Indices