run_classifier_single_gpu.sh 697 字节
Newer Older
X
xyzhou-puck 已提交
1
#!/bin/bash
X
xyzhou-puck 已提交
2
BERT_BASE_PATH="./bert_uncased_L-12_H-768_A-12/"
X
xyzhou-puck 已提交
3 4 5
DATA_PATH="./data/glue_data/MNLI/"
CKPT_PATH="./data/saved_model/mnli_models"

X
xyzhou-puck 已提交
6
export CUDA_VISIBLE_DEVICES=0
X
xyzhou-puck 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

# start fine-tuning
python3.7 bert_classifier.py\
    --use_cuda true \
    --do_train true \
    --do_test true \
    --batch_size 64 \
    --data_dir ${DATA_PATH} \
    --vocab_path ${BERT_BASE_PATH}/vocab.txt \
    --checkpoints ${CKPT_PATH} \
    --save_steps 1000 \
    --weight_decay  0.01 \
    --warmup_proportion 0.1 \
    --validation_steps 100 \
    --epoch 3 \
    --max_seq_len 128 \
    --bert_config_path ${BERT_BASE_PATH}/bert_config.json \
    --learning_rate 5e-5 \
    --skip_steps 10 \
    --shuffle true