ShannonAI / mrc-for-flat-nested-ner

Code for ACL 2020 paper `A Unified MRC Framework for Named Entity Recognition`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A problem for Dice Loss

Thornhill-GYL opened this issue · comments

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.

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.