run_classifier.sh 936 字节
Newer Older
1
export FLAGS_eager_delete_tensor_gb=0.0
W
wuzewu 已提交
2
export CUDA_VISIBLE_DEVICES=0
Z
Zeyu Chen 已提交
3

Z
Zeyu Chen 已提交
4 5
# User can select chnsenticorp, nlpcc_dbqa, lcqmc for different task
DATASET="chnsenticorp"
Z
Zeyu Chen 已提交
6 7 8 9 10 11 12 13
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 \
14
                   --use_gpu=True \
Z
Zeyu Chen 已提交
15 16 17 18
                   --dataset=${DATASET} \
                   --checkpoint_dir=${CKPT_DIR} \
                   --learning_rate=5e-5 \
                   --weight_decay=0.01 \
Z
Zeyu Chen 已提交
19
                   --max_seq_len=128 \
W
wuzewu 已提交
20 21 22
                   --num_epoch=3 \
                   --use_pyreader=True \
                   --use_data_parallel=True \