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

how to combine lovasz hinge and bce in binary segmentaion task appropriately? #31

Open
yu-Mas opened this issue Dec 9, 2020 · 1 comment

Comments

@yu-Mas
Copy link

yu-Mas commented Dec 9, 2020

Dear BermanMaxin,
Thanks for your great work,it has helped me a lot!
I got a confusion that how to combine lovasz hinge and bce in binary segmentaion task appropriately.
As we all know,lovasz hinge expects logits(without sigmoid),but bce need relust after sigmoid.What confuses me is that whether these two different types(with/without sigmoid) losses can get along well.
Other combo loss,e.g. bce+lovasz softmax,bce+dice, all need sigmoid so in my mind there is no problem.
Could you give me some advice about this,thanks!
In addition,if 'per_image=False' can bring a faster convergence when batch size is big.
Thanks.

@mingqizhang
Copy link

You can use function lovasz_softmax(), and set the classes=[1].

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