Closed Talisberg closed 2 years ago
I'm afraid not. If you have per-sentence weights, what you may want do is multiply the weights with the output of forward
with reduction='none'
as argument. If you have per-token weights however, there's no easy way so you need to fork and modify the code yourself.
I have several thousands of sentences with different frequencies in real world on which I'm training a BI-LSTM CRF and using CRF layer.
is there a way to introduce these weights to the CRF layer?