biubug6 / Pytorch_Retinaface

Retinaface get 80.99% in widerface hard val using mobilenet0.25.
MIT License
2.63k stars 774 forks source link

loss函数有风险 #162

Open jacke121 opened 3 years ago

jacke121 commented 3 years ago

loc_t = torch.Tensor(num, num_priors, 4) landm_t = torch.Tensor(num, num_priors, 10) conf_t = torch.LongTensor(num, num_priors)

我打印了一下,loc_t,landm_t , conf_t初始值都不是0,如果后面赋值有漏洞,loss可能有问题。

alicera commented 3 years ago

Hi, jacke121 What does it mean?

icey-zhang commented 3 years ago

IOU的阈值self.threshold = overlap_thresh 被设为0.35,如果IOU没到这个阈值 if best_prior_idx_filter.shape[0] <= 0: loc_t[idx] = 0 conf_t[idx] = 0 return 那就直接return了 那conf_t就没有改变值,还是原来初始化的LongTensor 是不是就有点问题了

alicera commented 3 years ago

It have the for loop?