biubug6/Pytorch_Retinaface

loss函数有风险

jacke121 opened this issue · 3 comments

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可能有问题。

Hi, jacke121
What does it mean?

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
是不是就有点问题了

It have the for loop?