emanjavacas / pie

A fully-fledge PyTorch package for Morphological Analysis, tailored to morphologically rich and historical languages.
MIT License
22 stars 10 forks source link

Allow for other Loss systems #77

Open PonteIneptique opened 3 years ago

PonteIneptique commented 3 years ago

Akin to https://github.com/emanjavacas/pie/issues/76, I would like to try Dice Loss for Linear tasks. It's a bit more tricky to implement as it is done in model, and not in Trainer. What do you think ?

emanjavacas commented 3 years ago

I'd like to see if that Dice loss can help with any of the tasks more or less reliably. It'd require expanding LinearDecoder. It could be added as an extra decoder class. As far as I understand all ingredients needed to implement it are available to LinearDecoder.loss. In any case, the first thing to do would be to experiment and check for improvements. If you fancy that and have the time go ahead. But if it turns out not to be significantly useful, I'd rather stay away from overcomplicating the code base.

PonteIneptique commented 3 years ago

I was thinking we could use model.loss(type=ENUM) or something like this, down the road. But yes, from what I have seen, I don't expect improvements, I have less hope in this one than I had in #76