Skip to content

Missing alpha parameter of Focal loss in DiceFocalLoss #7682

Closed

Description

@dkalsan

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.

Activity

  1. KumoLiu commented on Apr 25, 2024

    @KumoLiu
    Contributor

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

  2. dkalsan commented on Apr 25, 2024

    @dkalsan
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions