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 |