-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DiceLoss add weight per class parameter #7065
Labels
Milestone
Comments
KumoLiu
added a commit
to KumoLiu/MONAI
that referenced
this issue
Oct 7, 2023
Signed-off-by: KumoLiu <yunl@nvidia.com>
wyli
pushed a commit
that referenced
this issue
Oct 8, 2023
Fixes #7065. ### Description - standardize the naming to be simply "weight". - add this "weight" parameter to `DiceLoss`. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: KumoLiu <yunl@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
KumoLiu
added a commit
to KumoLiu/MONAI
that referenced
this issue
Oct 24, 2023
Signed-off-by: KumoLiu <yunl@nvidia.com>
7 tasks
wyli
pushed a commit
that referenced
this issue
Oct 24, 2023
Fixes #7065 ### Description Remove `self.weight` in `DiceLoss` and `FocalLoss` ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: KumoLiu <yunl@nvidia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently DiceFocalLoss(), has "focal_weight", which reweights class contributions (but only for the focal loss part).
Similarly DiceCELoss(), has "ce_weight" parameter for the same thing of CE loss part.
This can be achieved by modifying DiceLoss() after this line
MONAI/monai/losses/dice.py
Line 182 in 14fcf72
with an additional code snippet (or similar)
thank you
The text was updated successfully, but these errors were encountered: