EOA-AILab / NER-Chinese

Comparison of Chinese Named Entity Recognition Models between NeuroNER and BertNER
328 stars 111 forks source link

关于不能加载bert模型的问题 #10

Open GuanYingxuan opened 2 years ago

GuanYingxuan commented 2 years ago

您好!我在进行模型训练时遇到了这个问题: tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file C:\Users\Desktop\ner_zh\bert_ner\bert_ner\chinese_L-12_H-768_A-12\bert_model.ckpt: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator? 请问该如何正确加载模型呢?试过将"bert_model.ckpt.data-00000-of-00001"的后缀删除但并不好用。期待您的回复!

GuanYingxuan commented 2 years ago

已解决,将网盘链接中的文件chinese_L-12_H-768_A-12\bert_model.ckpt(1).index改名为bert_model.ckpt.index即可