Originally posted by **dancingreindeer** September 26, 2024
```python
if self.use_softmax:
if not self.include_background and self.alpha is not None:
self.alpha = None
warnings.warn("include_background=False, alpha ignored when using softmax.")
loss = softmax_focal_loss(input, target, self.gamma, self.alpha)
```
This is the code piece. Not sure why when we don't include background and when using softmax, alpha became invalid? Does this assume there are no label imbalance? How to address this when there is significantly more negative samples than positive samples in the experiment then?
Discussed in https://github.com/Project-MONAI/MONAI/discussions/8116