jiangnanboy / albert_lstm_crf_ner

albert + lstm + crf实体识别,pytorch实现。识别的主要实体是人名、地名、机构名和时间。albert + lstm + crf (named entity recognition)
132 stars 31 forks source link

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? #3

Open LIZ-dandan opened 2 years ago

LIZ-dandan commented 2 years ago

when i run tfmodel_2_pymodel.py, pycharm told me OSError: 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? how can i solve this promblem?

LIZ-dandan commented 2 years ago

I fixed the problem myself by unzip the pretrain/tf/albert_base_zh.zip to pretrain/tf/albert_base_zh, and replace the origin path with "pretrain/tf/albert_base_zh/" In another words, the tf directory is organized like this: tf_dir