ShannonAI / mrc-for-flat-nested-ner

Code for ACL 2020 paper `A Unified MRC Framework for Named Entity Recognition`
643 stars 117 forks source link

Shouldn't there be separately declared losses? #85

Closed seanswyi closed 3 years ago

seanswyi commented 3 years ago

Hi, thanks for your work. I'm just curious regarding the loss calculation inside the trainer module. It seems like you're declaring the loss function once (e.g., self.bce_loss = nn.BCEWithLogitsLoss()) but shouldn't you be declaring a loss object for the start, end, and matching logits? If I'm misunderstanding something please feel free to let me know. Thanks!