macanv / BERT-BiLSTM-CRF-NER

Tensorflow solution of NER task Using BiLSTM-CRF model with Google BERT Fine-tuning And private Server services
https://github.com/macanv/BERT-BiLSMT-CRF-NER
4.69k stars 1.26k forks source link

只作预测,不做训练 #287

Open Alethx opened 4 years ago

Alethx commented 4 years ago

bert-base-ner-train \ -data_dir /home/lef/Desktop/\ -output_dir /home/lef/Desktop/output\ -init_checkpoint /home/lef/Desktop/bert_chinese/bert_model.ckpt\ -bert_config_file /home/lef/Desktop/bert_chinese/bert_config.json \ -vocab_file /home/lef/Desktop/bert_chinese/vocab.txt \ -max_seq_length 128 \ -num_train_epochs 5 \ -do_train FALSE \ -do_eval FALSE 已经训练好了一个模型,现在想在一个新的test集检测下,但是用了如上语句后,程序显示train和eval还是true,请问需要如何修改呢?

macanv commented 4 years ago

-do_train -do_eval即可,不要带参数,为啥可以google

Alethx commented 4 years ago

刚刚试了一下,do_train do_eval后面没跟参数, 但是运行后显示error:bert-base-ner-train: error: argument -do_train: expected one argument。 请问是怎么回事呢

macanv commented 4 years ago

-do_train -do_eval

ghost commented 4 years ago

使用源码安装 @Alethx

duliping commented 4 years ago

-do_train -do_eval

还是报这个错:bert-base-ner-train: error: argument -do_train: expected one argument

试了-do_train '' -do_eval '' 可以把train和eval设为False