1

I'm trying to learn a seq2seq model with fairseq. I want to have different loss weighting for each sample, so there will be examples which the model will try to fit better. What is the correct way to do it? Maybe better libraries for that purpose?

user3209762
  • 113
  • 6

1 Answers1

0

I am not sure about FairSeq, but it can be done trivially in Marian that by default has an option --data-weighting where you can provide a file with a list of weights. OpenNMT provides similar functionality, but with per-corpus weighting.

Jindřich
  • 10,270
  • 2
  • 23
  • 44