Skip to content

Add label smoothing param in DiceCELoss #7957

Closed
@dmtryzarubin

Description

@dmtryzarubin

Is your feature request related to a problem? Please describe.
It would be nice to have such ability to use label smoothing in init method of DiceCELoss

Describe the solution you'd like
Add label_smoothing param into DiceCELoss and pass it directly into torch.nn.CrossEntropyLoss

Describe alternatives you've considered
_

Additional context
This is the only way to do this now:

from monai.losses import DiceCELoss


criterion = DiceCELoss()
criterion.cross_entropy.label_smoothing = 0.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions