Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retinaface使用FGD精度下降 #41

Closed
408550969 opened this issue Jun 23, 2022 · 0 comments
Closed

retinaface使用FGD精度下降 #41

408550969 opened this issue Jun 23, 2022 · 0 comments

Comments

@408550969
Copy link

你好,我用retinaface训练自己的数据集,发现使用fgd后精度比不用低。teacher模型已验证精度,是正常的。我的teacher模型backbone是resnet50,student的backbone是mobilenetv3-small。
我将ssh后的特征层拿来计算fgd的loss,具体代码如下:
out,features = net(images)
loss_l, loss_c = criterion(out, priors, targets)
loss = cfg['loc_weight'] * loss_l + loss_c
with torch.no_grad():
teacher_out,teacher_features = teacher_net(images)
for i in range(3):
ComputeFeatureLoss = FeatureLoss(features[i].shape[1],teacher_features[i].shape[1])
ComputeFeatureLoss = ComputeFeatureLoss.cuda()
distilloss=ComputeFeatureLoss(features[i],teacher_features[i],targets)
loss= loss + distilloss
retinaface的targets是归一化的值,不是像素值,所以我去掉了img_metas。FeatureLoss的参数采用的默认值,请问造成精度较低的原因可能有哪些?

@408550969 408550969 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant