Class weights in Trainer() instance

Hello everyone,

I know the question isn’t new but I wanted to see if there have been new features/developments to this: Is there a way to easily add class weights while fine tuning a bert model? I am doing the fine tuning with the Trainer() instance.

Cheers

You can override the loss computation anyway you like by subclassing the Trainer, as is documented here.