stanleylsx / entity_extractor_by_ner

基于Tensorflow2.3开发的NER模型,都是CRF范式,包含Bilstm(IDCNN)-CRF、Bert-Bilstm(IDCNN)-CRF、Bert-CRF,可微调预训练模型,可对抗学习,用于命名实体识别,配置后可直接运行。
390 stars 73 forks source link

TypeError: 'NoneType' object is not callable #67

Closed 582856 closed 8 months ago

582856 commented 8 months ago

Traceback (most recent call last): File "main.py", line 74, in train = Train(configs, dataManager, logger) File "/root/ner/engines/train.py", line 55, in init self.ner_model = NerModel(configs, vocab_size, num_classes) File "/root/ner/engines/model.py", line 23, in init self.pretrained_model = TFBertModel.from_pretrained('./bert-base-chinese') File "/root/miniconda3/lib/python3.8/site-packages/transformers/modeling_tf_utils.py", line 2919, in from_pretrained model.build() # build the network with dummy inputs File "/root/miniconda3/lib/python3.8/site-packages/transformers/modeling_tf_utils.py", line 1134, in build if self.built or call_context().in_call: TypeError: 'NoneType' object is not callable PixPin_2023-12-30_21-53-56