ErikEnglesson / GJS

The official code for the NeurIPS 2021 paper Generalized Jensen-Shannon Divergence Loss for Learning with Noisy Labels (https://arxiv.org/abs/2105.04522)
21 stars 1 forks source link

which loss should I use #3

Closed yuzhiguo07 closed 2 years ago

yuzhiguo07 commented 2 years ago

Hi, thank you for your outstanding contributions!

I want to have a quick try using GJS on my own task, for 2-state and 3-state classification tasks, should I follow the hyper-parameters in C10/sym/js-40.yaml which using JSWCS loss and setting the js_weights to [0.7, 0.3]?

Also, I have another regression task using MAE loss originally, which loss should I use in losses.py to replace the MAE loss with?

Thank you very much.

ErikEnglesson commented 2 years ago

Hi, thank you for you interest in our work!

Classification To use GJS with two predictive distributions from predicting on two strongly augmented versions of the original training image, please use: loss: JSWCS augs: ss js_weights: 0.3 0.35 0.35

The JSWCS loss is used for both JS and GJS, where the number of characters for the augs parameter determines if you are using JS (1) or GJS (>=2). The parameters for js_weights corresponds to [\pi_1, \pi_2, \pi_3] in the paper. js_weights: 0.3 0.35 0.35 should be a good starting point, but the amount of label noise in the dataset determines the optimal setting for js_weights, which can be found through a hyper-parameter search.

Regression Unfortunately, losses.py only contains loss functions for classification.

You could easily add your own regression loss to losses.py, but don't forget to add it to the get_criterion function and as a possible choice for the loss argument on line 454 in train.py.

Thanks again.

yuzhiguo07 commented 2 years ago

Perfect! Thank you for your information!