This commit is contained in:
Glenn Jocher 2019-02-19 19:36:09 +01:00
parent 75225e4d99
commit 9df279cded
1 changed files with 2 additions and 2 deletions

View File

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