File size: 313 Bytes
5fa1a76
 
 
 
 
 
 
1
2
3
4
5
6
7
Train
Before you start training your model, create a map of the expected ids to their labels with id2label and label2id:

id2label = {0: "NEGATIVE", 1: "POSITIVE"}
label2id = {"NEGATIVE": 0, "POSITIVE": 1}

If you aren't familiar with finetuning a model with the [Trainer], take a look at the basic tutorial here!