File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ def __init__(
9999 of the sequence should be the same as the number of classes. If not ``include_background``,
100100 the number of classes should not include the background category class 0).
101101 The value/values should be no less than 0. Defaults to None.
102- soft_label: whether the target contains non-binary values or not
102+ soft_label: whether the target contains non-binary values (soft labels) or not.
103+ If True a soft label formulation of the loss will be used.
103104
104105 Raises:
105106 TypeError: When ``other_act`` is not an ``Optional[Callable]``.
@@ -302,7 +303,8 @@ def __init__(
302303 batch: whether to sum the intersection and union areas over the batch dimension before the dividing.
303304 Defaults to False, intersection over union is computed from each item in the batch.
304305 If True, the class-weighted intersection and union areas are first summed across the batches.
305- soft_label: whether the target contains non-binary values or not
306+ soft_label: whether the target contains non-binary values (soft labels) or not.
307+ If True a soft label formulation of the loss will be used.
306308
307309 Raises:
308310 TypeError: When ``other_act`` is not an ``Optional[Callable]``.
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ def __init__(
7575 batch: whether to sum the intersection and union areas over the batch dimension before the dividing.
7676 Defaults to False, a Dice loss value is computed independently from each item in the batch
7777 before any `reduction`.
78- soft_label: whether the target contains non-binary values or not
78+ soft_label: whether the target contains non-binary values (soft labels) or not.
79+ If True a soft label formulation of the loss will be used.
7980
8081 Raises:
8182 TypeError: When ``other_act`` is not an ``Optional[Callable]``.
Original file line number Diff line number Diff line change @@ -29,8 +29,6 @@ def compute_tp_fp_fn(
2929 Adapted from:
3030 https://github.com/zifuwanggg/JDTLosses
3131 """
32- if torch .unique (target ).shape [0 ] > 2 and not soft_label :
33- warnings .warn ("soft labels are used, but `soft_label == False`." )
3432
3533 # the original implementation that is erroneous with soft labels
3634 if ord == 1 and not soft_label :
You can’t perform that action at this time.
0 commit comments