-
Book Overview & Buying
-
Table Of Contents
Mastering Transformers. - Second Edition
By :
In this chapter, we will learn how to configure a pre-trained model for text classification and how to fine-tune it for any text classification downstream task, such as sentiment analysis, multi-class classification, or multi-label classification. We will also discuss how to handle sentence-pair and regression problems by covering an implementation example. We will work with well-known datasets such as GLUE, as well as our own custom datasets. We will then take advantage of the Trainer class, which deals with the complexity of processes for training and fine-tuning.
First, we will learn how to fine-tune single-sentence binary sentiment classification with the Trainer class. Then, we will train for sentiment classification with native PyTorch without the Trainer class. In multi-class classification and multi-label classification, more than two classes will be taken into consideration. We will have seven class classification fine...