Grid indices overflow bug fix 2 (#1551)

This commit is contained in:
Glenn Jocher 2020-11-09 20:59:57 +01:00 committed by GitHub
parent 95460570d9
commit 46cd0d8cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,7 +464,6 @@ def build_targets(p, targets, model):
gi, gj = gij.T # grid xy indices
# Append
indices.append((b, a, gj, gi)) # image, anchor, grid indices
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
tbox.append(torch.cat((gxy - gij, gwh), 1)) # box
anch.append(anchors[a]) # anchors