run_classifier.sh 896 字节
Newer Older
W
wuzewu 已提交
1
export CUDA_VISIBLE_DEVICES=0
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
                   --max_seq_len=128 \
W
wuzewu 已提交
19 20 21
                   --num_epoch=3 \
                   --use_pyreader=True \
                   --use_data_parallel=True \