未验证 提交 a4152a5b 编写于 作者: Y Yonghye Kwon 提交者: GitHub

perf(head): faster computation to find overlapped anchor (#1473)

上级 dbb4efb6
......@@ -630,7 +630,7 @@ class YOLOXHead(nn.Module):
del topk_ious, dynamic_ks, pos_idx
anchor_matching_gt = matching_matrix.sum(0)
if (anchor_matching_gt > 1).sum() > 0:
if anchor_matching_gt.max() > 1:
_, cost_argmin = torch.min(cost[:, anchor_matching_gt > 1], dim=0)
matching_matrix[:, anchor_matching_gt > 1] *= 0
matching_matrix[cost_argmin, anchor_matching_gt > 1] = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册