kyzhouhzau / BERT-NER

Use Google's BERT for named entity recognition (CoNLL-2003 as the dataset).
MIT License
1.24k stars 335 forks source link

uesd other NER labels, and have some problems #53

Open prometheusloong opened 5 years ago

prometheusloong commented 5 years ago

i change the ner labels in BERT_NER.py line 227, and i have problems like follow,

InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [29,29] rhs shape= [13,13]
carolmanderson commented 5 years ago

I had the same problem. In my case, I first trained on the CoNLL data, and then trained on my own data without changing the output_dir parameter. The script was attempting to restore a saved checkpoint in that folder, which expected 13 classes. Specifying a fresh output_dir solved the problem.

jaysinghr commented 5 years ago

@carolmanderson can you please tell me how i can prepare custom training data?

zwd13122889 commented 4 years ago

Can you please help as to how to integrate BERT based entity recognition into RASA. I have integrated the intent classification that BERT offers into RASA, but I having difficulties to integrate the entity recognition