updates
This commit is contained in:
parent
01d9d551c3
commit
b81c17aa9f
|
@ -427,12 +427,11 @@ def build_targets(model, targets):
|
||||||
a = torch.arange(na).view((-1, 1)).repeat([1, nt]).view(-1)
|
a = torch.arange(na).view((-1, 1)).repeat([1, nt]).view(-1)
|
||||||
t = targets.repeat([na, 1])
|
t = targets.repeat([na, 1])
|
||||||
gwh = gwh.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 anchors below iou_thres (OPTIONAL, increases P, lowers R)
|
||||||
reject = True
|
reject = True
|
||||||
if reject:
|
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]
|
t, a, gwh = t[j], a[j], gwh[j]
|
||||||
|
|
||||||
# Indices
|
# Indices
|
||||||
|
|
Loading…
Reference in New Issue