filmov
tv
Using a custom loss function

Показать описание
In this video, we will see how to use a custom loss function. Most 🤗 Transformers models automatically return the loss when you provide them with labels, but sometimes, you don't want the default loss. Here we show how to dynamically weight samples in the loss using the Trainer API and 🤗 Accelerate.
Open in colab to run the code samples:
Related videos:
Open in colab to run the code samples:
Related videos: