Open lycwgf opened 4 years ago
multibox_loss.py line 104
# Hard Negative Mining
loss_c[pos.view(-1, 1)] = 0 # filter out pos boxes for now
loss_c = loss_c.view(num, -1)
_, loss_idx = loss_c.sort(1, descending=True)
_, idx_rank = loss_idx.sort(1)
num_pos = pos.long().sum(1, keepdim=True)
num_neg = torch.clamp(self.negpos_ratio*num_pos, max=pos.size(1)-1)
neg = idx_rank < num_neg.expand_as(idx_rank)
多谢多谢!
您好,我想问一下代码中包含在线样本挖掘代码吗?没有找到这部分代码,多谢多谢,还请指导,