Implementation of some unbalanced loss like focal_loss, dice_loss, DSC Loss, GHM Loss et.al
Implementation of some unbalanced loss for NLP task like focal_loss, dice_loss, DSC Loss, GHM Loss et.al
Summary
Here is a loss implementation repository included unbalanced loss
How to use?
You can find all the loss usage information in test_loss.py.
Here is a simple demo of usage:
import torch
from unbalanced_loss.focal_loss import MultiFocalLoss
batch_size, num_class = 64, 10
Loss_Func = MultiFocalLoss(num_class=num_class, gamma=2.0, reduction=