diff --git a/utils/utils.py b/utils/utils.py index a7a61ff1..3086dc5e 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -219,8 +219,8 @@ def build_targets(target, anchor_wh, nA, nC, nG): returns nT, nCorrect, tx, ty, tw, th, tconf, tcls """ nB = len(target) # number of images in batch - nT = [len(x) for x in target] # torch.argmin(target[:, :, 4], 1) # targets per image - tx = torch.zeros(nB, nA, nG, nG) # batch size (4), number of anchors (3), number of grid points (13) + nT = [len(x) for x in target] + tx = torch.zeros(nB, nA, nG, nG) # batch size, anchors, grid size ty = torch.zeros(nB, nA, nG, nG) tw = torch.zeros(nB, nA, nG, nG) th = torch.zeros(nB, nA, nG, nG)