Optimization-AI / LibAUC

LibAUC: A Deep Learning Library for X-Risk Optimization
https://libauc.org/
MIT License
273 stars 37 forks source link

mAUCMLoss for multi-label classification when bs=1 loss return 0 #36

Closed SNEAndy closed 8 months ago

SNEAndy commented 10 months ago

Hi,I'm using the mAUCMLoss to finish my multi-label classification. I realized that if the batch size of my dataloader is 1,the mAUCMLoss will always be 0,otherwise,it will not. So the batch size must greater than 1 to fit this loss function ?

GangLii commented 9 months ago

Thanks for using our library! Could you explain more about your problem? Are you using v1 or v2 version? Do you use TriSampler? It would be helpful to diagnose what is happening if you could share a snippet of your initialization code.