BERT-BiLSTM-CRF-NER训练过程

0、在cmd运行中文模型:

windows:
bert-serving-start -model_dir E:/git/bert-use-demo-master/chinese_L-12_H-768_A-12 -num_worker=1 -max_seq_len=100 & 

linux:

bert-serving-start -model_dir E:\git\bert-use-demo-master\chinese_L-12_H-768_A-12 -num_worker=1 -max_seq_len=100 & 
1、##训练好的模型
windows:  
   bert-base-serving-start -model_dir E:/BaiduNetdiskDownload/BERT_NER/dir  -bert_model_dir E:/git/bert-use-demo-master/chinese_L-12_H-768_A-12 -model_pb_dir E:/BaiduNetdiskDownload/BERT_NER -mode NER
linux:
  bert-base-serving-start -model_dir /workspace/HOSTDIR/BERT-BiLSTM-CRF-NER/BERT_NER/dir  -bert_model_dir /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12 -model_pb_dir /workspace/HOSTDIR/BERT-BiLSTM-CRF-NER/BERT_NER -mode NER

2、##训练模型
本地:
bert-base-ner-train -data_dir E:/git/Name-Entity-Recognition-master/BERT-BiLSTM-CRF-NER/NERdata -bert_config_file /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/bert_config.json -init_checkpoint /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/bert_model.ckpt -vocab_file /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/vocab.txt -output_dir E:/git/BERT-NER-master/output/result_dir -num_train_epochs 2
Linux
bert-base-ner-train -data_dir /workspace/HOSTDIR/BERT-BiLSTM-CRF-NER/NERdata -bert_config_file  /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/bert_config.json -init_checkpoint /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/bert_model.ckpt -vocab_file /workspace/HOSTDIR/bert-use-demo-master/chinese_L-12_H-768_A-12/vocab.txt -output_dir /workspace/HOSTDIR/BERT-BiLSTM-CRF-NER/output_base -num_train_epochs 1   -device_map 3 -batch_size 16 -num_train_epochs 1


3、用代码训练
nohup python bert_lstm_ner.py  >0531.txt  2>& 1&

你可能感兴趣的:(BERT-BiLSTM-CRF-NER训练过程)