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

K
kinghuin 已提交
4 5
# User can select chnsenticorp, nlpcc_dbqa, lcqmc and so on for different task

Z
Zeyu Chen 已提交
6
DATASET="chnsenticorp"
Z
Zeyu Chen 已提交
7
CKPT_DIR="./ckpt_${DATASET}"
K
kinghuin 已提交
8 9 10 11 12 13 14 15 16

# Support ChnSentiCorp	NLPCC_DBQA	LCQMC	MRPC	QQP	SST-2
#         CoLA	QNLI	RTE	MNLI	XNLI
# for XNLI: Specify the language with an underscore like xnli_zh.
#       ar: Arabic      bg: Bulgarian      de: German
#       el: Greek       en: English        es: Spanish
#       fr: French      hi: Hindi          ru: Russian
#       sw: Swahili     th: Thai           tr: Turkish
#       ur: Urdu        vi: Vietnamese     zh: Chinese (Simplified)
Z
Zeyu Chen 已提交
17 18 19

python -u text_classifier.py \
                   --batch_size=24 \
20
                   --use_gpu=True \
Z
Zeyu Chen 已提交
21 22 23 24
                   --dataset=${DATASET} \
                   --checkpoint_dir=${CKPT_DIR} \
                   --learning_rate=5e-5 \
                   --weight_decay=0.01 \
Z
Zeyu Chen 已提交
25
                   --max_seq_len=128 \
W
wuzewu 已提交
26 27 28
                   --num_epoch=3 \
                   --use_pyreader=True \
                   --use_data_parallel=True \
29
                   --use_taskid=False \