linux 的bash 和 反斜杠

export BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12
export GLUE_DIR=/path/to/glue

python run_classifier.py 
  --task_name=MRPC 
  --do_train=true 
  --do_eval=true 
  --data_dir=$GLUE_DIR/MRPC 
  --vocab_file=$BERT_BASE_DIR/vocab.txt 
  --bert_config_file=$BERT_BASE_DIR/bert_config.json 
  --init_checkpoint=$BERT_BASE_DIR/bert_model.ckpt 
  --max_seq_length=128 
  --train_batch_size=32 
  --learning_rate=2e-5 
  --num_train_epochs=3.0 
  --output_dir=/tmp/mrpc_output/

vim run.sh

输入以上代码(注意换行一定要用,反斜杠!引入变量要用export!)

保存后运行,bash run.sh

原文地址:https://www.cnblogs.com/qiezi-online/p/14046903.html