PyTorch 1.6.0 compatability updates
This commit is contained in:
1 parent
7f8471eaeb
commit
43a616a955
3 files changed
+7
-6
No files matched your search
@@ -148,8 +148,8 @@ def test(data,
|
||||
|
||||
# Per target class
|
||||
for cls in torch.unique(tcls_tensor):
|
||||
ti = (cls == tcls_tensor).nonzero().view(-1) # prediction indices
|
||||
pi = (cls == pred[:, 5]).nonzero().view(-1) # target indices
|
||||
ti = (cls == tcls_tensor).nonzero(as_tuple=False).view(-1) # prediction indices
|
||||
pi = (cls == pred[:, 5]).nonzero(as_tuple=False).view(-1) # target indices
|
||||
|
||||
# Search for detections
|
||||
if pi.shape[0]:
|
||||
@@ -157,7 +157,7 @@ def test(data,
|
||||
ious, i = box_iou(pred[pi, :4], tbox[ti]).max(1) # best ious, indices
|
||||
|
||||
# Append detections
|
||||
for j in (ious > iouv[0]).nonzero():
|
||||
for j in (ious > iouv[0]).nonzero(as_tuple=False):
|
||||
d = ti[i[j]] # detected target
|
||||
if d not in detected:
|
||||
detected.append(d)
|
||||
|
||||
Reference in new issue
Block a user