Closed Thornhill-GYL closed 3 years ago
Here is the code of dice loss: https://github.com/ShannonAI/mrc-for-flat-nested-ner/blob/master/loss/dice_loss.py
Though, I am not able to use this with huggingface token classification task. There is shape mismatch, because output from model is [batch_size, max_seq_len, num_labels] and labels are of the shape [batch_size, max_seq_len].
I have the same problem too.
They are working for binary classification only in fact.
Does anyone already have an extension to multi-class classification? Or is this only well-defined for binary classification?
Hi guys, sorry for the late reply. For the dice loss, please use our latest repo here.
The address "https://github.com/ShannonAI/dice_loss_for_NLP" in your paper《Dice Loss for Data-imbalanced NLP Tasks》can't be find! I would like to konw how can I get the code for dice_loss? Will you public it? Thanks.