Closed javierrodenas closed 3 years ago
Hi @javierrodenas , we haven't conducted any experiments using class weight to balance the classes. I think you can try to modify the SoftTargetCrossEntropy loss function here https://github.com/zihangJiang/TokenLabeling/blob/09bb641b1e8f3e94fa1b6c7180addf4507458541/tlt/loss/cross_entropy.py#L6-L17 to add the balanced class weights.
Hello,
I was trying to compute the class weight "balanced". I see that there are two arguments:
How can I add the parameter "weights" into the loss?
What I did so far:
See that I am changing the loss function, before I was using TokenLabelCrossEntropy:
Thank you in advance