Optimization-AI / LibAUC

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

question: what is the function of optimizer.update_regularizer() and DualSampler in the tutorial? #30

Closed 2catycm closed 1 year ago

2catycm commented 1 year ago

I forgot to add this two thing in my own code, and I observe bad performance, which is the loss curve dramatically goes up and auc goes up only for a small period and then falls down.

76c82923b6962fec815d20b590f60df

Should we call update_regularizer() after every epoch? If we don't call it , what might happen? I see the DualSampler in the dataloader in the tutorial too. I search nothing on Google, but something says it would make the dataset another form to compute triple loss, I don' t know what it is. I cannot find the documentation in your website and tutorial and I am new to this field, so I wonder if you can be so kind to help me understand them.

yzhuoning commented 1 year ago

Can you provide more information about your case, such as the data, loss, and optimizer being used? This will help me better understand and analyze your case.

For update_regularizer(), it is recommended to call the function according to your learning rate update strategy (e.g., decay lr every 50 epochs by a factor of 10) and it is only necessary when using AUCMLoss. As for dualsampler, it aims to resample the imbalanced data. However, it is better to first identify and resolve the instability issues in your case before using dualsampler.

Thanks!