GuoleiSun/HNC_loss

What's the k value setting?

Jiawei0o0 opened this issue · 1 comments

Thanks for your great job.
I am confused about the K value in the TopK function. I can't find the setting in your paper. Does it make sense to the result?
Waiting for your reply. Thanks a lot!

Hi,

Thanks for your interest. K value means that the CAMs of top-k negative classes will be suppressed. The code is here

topk_ind=torch.topk(x1,100,dim=1)[1]

It makes sense to the result and is a hyper parameter. For ImageNet, we set k as 100.