From 175e231c55597866575b7673383d2b777e0e12a5 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 4 Mar 2019 15:59:11 +0100 Subject: [PATCH] updates --- models.py | 2 -- utils/utils.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index a323e87e..1ecfdc18 100755 --- a/models.py +++ b/models.py @@ -150,8 +150,6 @@ class YOLOLayer(nn.Module): p_conf = p[..., 4] # Conf p_cls = p[..., 5:] # Class - print(self.anchor_vec.device, self.anchor_vec, self.nA, self.nC, nG) - txy, twh, mask, tcls = build_targets(targets, self.anchor_vec, self.nA, self.nC, nG) tcls = tcls[mask] diff --git a/utils/utils.py b/utils/utils.py index 05c68357..8907b626 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -256,6 +256,9 @@ def build_targets(target, anchor_vec, nA, nC, nG): # iou of targets-anchors (using wh only) box1 = gwh box2 = anchor_vec.unsqueeze(1) + + print(box1.device,box2.device) + inter_area = torch.min(box1, box2).prod(2) iou = inter_area / (box1.prod(1) + box2.prod(2) - inter_area + 1e-16)