Confusezius / Revisiting_Deep_Metric_Learning_PyTorch

(ICML 2020) This repo contains code for our paper "Revisiting Training Strategies and Generalization Performance in Deep Metric Learning" (https://arxiv.org/abs/2002.08473) to facilitate consistent research in the field of Deep Metric Learning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small batchsize

sudalvxin opened this issue · comments

When bs=32 and epoch>40, an error may occurs at "loss = criterion(**loss_args)" : RuntimeError: stack expects a non-empty TensorList

Thanks for pointing this out! Could you tell me what loss/mining method you used?

Thanks for your replay. The loss function is MultiSim.

--

Can you give me the full error message? I think its due to the semihard masking in the MultiSim loss which is not able to retrieve valid candidates in a small batch, but I just want to make sure. If that's the case I should be able to fix it quite easily.

Sorry, the error message has been delete.

Besides, have you test XBM~(Cross-Batch Memory for Embedding Learning) using this code? I introduce XBM in your framework, but the improvements on MS loss is very limited.

Then I assume its the masking that's causing the issue here - you can try and increase the loss_multisimilarity_margin parameter to avoid generating instance-free masks or use larger batchsize - I'll try to include some catch mechanism.

*mistakenly closed

Then I assume its the masking that's causing the issue here - you can try and increase the loss_multisimilarity_margin parameter to avoid generating instance-free masks or use larger batchsize - I'll try to include some catch mechanism.

ok, thanks.

Besides, have you test XBM~(Cross-Batch Memory for Embedding Learning) using this code? I introduce XBM in your framework, but the improvements on MS loss is very limited.

I know the XBM paper, but I haven't tested it with this framework specifically - Have you tested it with the constrastive loss and resnet?

Besides, have you test XBM~(Cross-Batch Memory for Embedding Learning) using this code? I introduce XBM in your framework, but the improvements on MS loss is very limited.

I know the XBM paper, but I haven't tested it with this framework specifically - Have you tested it with the constrastive loss and resnet?

I have tested XBN with constrastive loss on SOP and CUB. The result demonstrate that XBM is useful for large scale data. Besides, the performance of XBM is often effected by two parameters.

I'm closing this for now, feel free to open another issue if anything similar re-occurs :).