BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding环境搭建
数据集准备

环境搭建,按照以下执行,否则运行时会报乱七八糟的错误,耽误时间得不偿失。
conda create -n tensorflow1.15.5-python3.7 python=3.7
conda activate tensorflow1.15.5-python3.7
pip install tensorflow-gpu==1.15.5
pip install protobuf==3.19.0

python run_classifier.py \
--task_name=MRPC \
--use_tpu=False\
--do_train=true \
--do_eval=true \
--data_dir=/home/featurize/work/bert/GLUE/glue_data/MRPC \
--vocab_file=/home/featurize/work/bert/GLUE/BERT-BASE-DIR/uncased_L-12_H-768_A-12/vocab.txt \
--bert_config_file=/home/featurize/work/bert/GLUE/BERT-BASE-DIR/uncased_L-12_H-768_A-12/bert_config.json \
--init_checkpoint=/home/featurize/work/bert/GLUE/BERT-BASE-DIR/uncased_L-12_H-768_A-12/bert_model.ckpt.index \
--max_seq_length=128 \
--train_batch_size=64\
--learning_rate=2e-5 \
--num_train_epochs=3.0 \
--output_dir=mrpc_output