Views
No views yet
learning rate 2e-5,
batch size 64,
num_train_epochs=8,| Model | Accuracy | F1 Score | Test Sample per Second |
|---|---|---|---|
| Distilbert-base-uncased-emotion | 93.8 | 93.79 | 398.69 |
| Bert-base-uncased-emotion | 94.05 | 94.06 | 190.152 |
| Roberta-base-emotion | 93.95 | 93.97 | 195.639 |
| Albert-base-v2-emotion | 93.6 | 93.65 | 182.794 |
1from transformers import pipeline
2classifier = pipeline("text-classification",model='bhadresh-savani/albert-base-v2-emotion', return_all_scores=True)
3prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use", )
4print(prediction)
5
6"""
7Output:
8[[
9{'label': 'sadness', 'score': 0.010403595864772797},
10{'label': 'joy', 'score': 0.8902180790901184},
11{'label': 'love', 'score': 0.042532723397016525},
12{'label': 'anger', 'score': 0.041297927498817444},
13{'label': 'fear', 'score': 0.011772023513913155},
14{'label': 'surprise', 'score': 0.0037756056990474463}
15]]
16"""1{
2'test_accuracy': 0.936,
3 'test_f1': 0.9365658988006296,
4 'test_loss': 0.15278364717960358,
5 'test_runtime': 10.9413,
6 'test_samples_per_second': 182.794,
7 'test_steps_per_second': 2.925
8 }