run_ChnSentiCorp.sh 1.2 KB
Newer Older
T
tianxin04 已提交
1 2
set -eux

T
tianxin 已提交
3
export FLAGS_eager_delete_tensor_gb=0
T
tianxin04 已提交
4 5 6 7 8 9 10 11
export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0

python -u run_classifier.py \
                   --use_cuda true \
                   --verbose true \
                   --do_train true \
                   --do_val true \
T
tianxin 已提交
12
                   --do_test false \
T
tianxin04 已提交
13
                   --batch_size 24 \
T
tianxin04 已提交
14
                   --init_pretraining_params ${MODEL_PATH}/params \
T
tianxin04 已提交
15
                   --train_set ${TASK_DATA_PATH}/chnsenticorp/train.tsv \
T
tianxin 已提交
16 17
                   --dev_set ${TASK_DATA_PATH}/chnsenticorp/dev.tsv,${TASK_DATA_PATH}/chnsenticorp/test.tsv \
                   --vocab_path ${MODEL_PATH}/vocab.txt \
T
tianxin04 已提交
18 19 20 21 22 23 24
                   --checkpoints ./checkpoints \
                   --save_steps 1000 \
                   --weight_decay  0.01 \
                   --warmup_proportion 0.0 \
                   --validation_steps 100 \
                   --epoch 10 \
                   --max_seq_len 256 \
T
tianxin 已提交
25
                   --ernie_config_path ${MODEL_PATH}/ernie_config.json \
T
tianxin04 已提交
26 27 28 29 30
                   --learning_rate 5e-5 \
                   --skip_steps 10 \
                   --num_iteration_per_drop_scope 1 \
                   --num_labels 2 \
                   --random_seed 1