File size: 587 Bytes
16789e1
 
5a80436
 
e7be497
 
16789e1
5a80436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
license: mit
datasets:
- imdb
tags:
- pytorch
---
对bert-base-uncased模型进行微调的情感分析,数据集采用IMDB。

具体参数如下:
```python
training_args = TrainingArguments(
    output_dir='./results/trainer',
    num_train_epochs=3,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
    warmup_steps=500,
    weight_decay=0.01,
    logging_dir='./logs',
    logging_steps=10,
    load_best_model_at_end=True,
    save_strategy='epoch',
    evaluation_strategy='epoch'
)
```

代码仓库:https://github.com/zengchen233/sentiment-classfier