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

softtriploss param #9

Closed
sky186 opened this issue Nov 13, 2020 · 1 comment
Closed

softtriploss param #9

sky186 opened this issue Nov 13, 2020 · 1 comment

Comments

@sky186
Copy link

sky186 commented Nov 13, 2020

@idstcv
您好,谢谢您的开源代码,很棒^^
我用在我的框架中,有点疑问
1、args.dim, args.C ,这个是输出特征的维度,和训练数据的所有的类别?参数中是98,
2、如果用在其其他检索任务上,下面的其他参数需要调整吗?
3、在reid 任务上,您有试过, softtriploss +分类损失联合训练吗
4、模型 和 损失的学习率 为什么设置的不同?
5、什么情况下,用该损失 表现并不理想?

criterion = loss.SoftTriple(args.la, args.gamma, args.tau, args.margin, args.dim, args.C, args.K).cuda()
optimizer = torch.optim.Adam([{"params": model.parameters(), "lr": args.modellr},
{"params": criterion.parameters(), "lr": args.centerlr}],
eps=args.eps, weight_decay=args.weight_decay)

We refer the objective in Eqn. 10 asSoft-Triple. We setτ= 0.2andγ= 0.1for SoftTriple. Besides,we set a small margin asδ= 0.01to break the tie explicitly.The number of centers is set toK= 10.

@qian-qi
Copy link
Member

qian-qi commented Dec 3, 2020

Hi,

  1. dim和C和你说的一致.
  2. 实验中参数表现还是比较stable的,可能在不同数据集上需要调一下K,保证K小于每个class里样本的数量.
  3. SoftTriple本身就是个分类loss,所以我们没试过和分类的联合训练.
  4. 模型的backbone是在ImageNet上pre-train过的,loss里的params是learn from scratch的,所以lr不一样.
  5. 我们在实验中没发现过不理想的情况. 因为在worst case下,i.e., 类内没有多个clusters的结构,SoftTriple也可以degenerate到标准的normalized SoftMax loss.

@qian-qi qian-qi closed this as completed Dec 9, 2020
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

2 participants