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

Missing alpha parameter of Focal loss in DiceFocalLoss #7682

Open
dkalsan opened this issue Apr 19, 2024 · 2 comments · May be fixed by #7841
Open

Missing alpha parameter of Focal loss in DiceFocalLoss #7682

dkalsan opened this issue Apr 19, 2024 · 2 comments · May be fixed by #7841

Comments

@dkalsan
Copy link

dkalsan commented Apr 19, 2024

Describe the bug
The available class monai.losses.DiceFocalLoss is missing the alpha parameter for Focal loss. Is this a result of some design choice or just got overlooked in the implementation?

Expected behavior
alpha parameter should be passed to the monai.losses.FocalLoss or have the reason for its absence documented.

@KumoLiu
Copy link
Contributor

KumoLiu commented Apr 25, 2024

Hi @dkalsan, what does alpha mean here, can you be more explicit? Thanks.

@dkalsan
Copy link
Author

dkalsan commented Apr 25, 2024

I mean the argument passed down to the FocalLoss class during construction, which results in an alpha-balanced Focal loss as per the paper. I believe this argument should also be available in the DiceFocalLoss since it's effectively just a wrapper around the two losses.

From the docstring of FocalLoss:

alpha – value of the alpha in the definition of the alpha-balanced Focal loss. The value should be in [0, 1]. Defaults to None.

@kephale kephale linked a pull request Jun 12, 2024 that will close this issue
5 tasks
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

Successfully merging a pull request may close this issue.

2 participants