Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which loss should I use #3

Closed
yuzhiguo07 opened this issue Dec 29, 2021 · 2 comments
Closed

which loss should I use #3

yuzhiguo07 opened this issue Dec 29, 2021 · 2 comments

Comments

@yuzhiguo07
Copy link
Contributor

yuzhiguo07 commented Dec 29, 2021

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
Copy link
Owner

ErikEnglesson commented Dec 29, 2021

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
Copy link
Contributor Author

Perfect! Thank you for your information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants