run_classifier.sh 807 字节
Newer Older
Z
Zeyu Chen 已提交
1
export CUDA_VISIBLE_DEVICES=1
Z
Zeyu Chen 已提交
2

Z
Zeyu Chen 已提交
3 4
# User can select chnsenticorp, nlpcc_dbqa, lcqmc for different task
DATASET="chnsenticorp"
Z
Zeyu Chen 已提交
5 6 7 8 9 10 11 12
CKPT_DIR="./ckpt_${DATASET}"
# Recommending hyper parameters for difference task
# ChnSentiCorp: batch_size=24, weight_decay=0.01, num_epoch=3, max_seq_len=128, lr=5e-5
# NLPCC_DBQA: batch_size=8, weight_decay=0.01, num_epoch=3, max_seq_len=512, lr=2e-5
# LCQMC: batch_size=32, weight_decay=0, num_epoch=3, max_seq_len=128, lr=2e-5

python -u text_classifier.py \
                   --batch_size=24 \
13
                   --use_gpu=True \
Z
Zeyu Chen 已提交
14 15 16 17
                   --dataset=${DATASET} \
                   --checkpoint_dir=${CKPT_DIR} \
                   --learning_rate=5e-5 \
                   --weight_decay=0.01 \
Z
Zeyu Chen 已提交
18 19
                   --max_seq_len=128 \
                   --num_epoch=3