mirror of
https://github.com/WongKinYiu/yolov7.git
synced 2025-06-03 21:54:57 +08:00
main code
set top_k temporally
This commit is contained in:
parent
8f2e9e701c
commit
5f1b78ad61
@ -712,7 +712,7 @@ class ComputeLossOTA:
|
||||
|
||||
pair_wise_iou_loss = -torch.log(pair_wise_iou + 1e-8)
|
||||
|
||||
top_k, _ = torch.topk(pair_wise_iou, min(20, pair_wise_iou.shape[1]), dim=1)
|
||||
top_k, _ = torch.topk(pair_wise_iou, min(10, pair_wise_iou.shape[1]), dim=1)
|
||||
dynamic_ks = torch.clamp(top_k.sum(1).int(), min=1)
|
||||
|
||||
gt_cls_per_image = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user