run_thuc.sh 1.3 KB
Newer Older
T
tianxin04 已提交
1 2
set -eux

T
tianxin 已提交
3
export FLAGS_eager_delete_tensor_gb=0
T
tianxin04 已提交
4 5 6
export FLAGS_sync_nccl_allreduce=1
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

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