Question about Multi-class focal loss
DingYuan0118 opened this issue · comments
I notice that it seems that focal_loss.py
only implements focal loss on the binary classification setting. Do there exist any implementations about focal loss for a multi-class classification setting?
Hi,
I can think of two methods for multi-class classification:
- focal loss works in same way like sigmoid-cross-entropy, thus you can consider each class as a seperate binary classification task.
- change sigmoid function into softmax function, this would require modifying the code.
From my personal experience, focal loss does not work so well as expected in multi-class classification tasks. I have not done sufficiently experiments to verify this, but I simply have this impression.
question about answered.