I’m beginner of pytorch  It’s my first question.
I want to use focal loss 18 in my research.
I’m struggling to apply focal loss into multi-class segmentation problem. I implement the loss function but it doesn’t work. Implementation is here.(https://github.com/doiken23/pytorch_toolbox/blob/master/focal_loss_multiclass.py 84
I can do training with my focal loss layer, but behavior may be strange. For example, when γ=0 focal loss is same to cross-entropy loss, but loss curve is very different (in training with focal loss layer, difference of accuracy between training and validation is very large.)
I confirm that output of two loss layer is same if input is same, but I can’t find the reason. Please help me…