taishan1994 / BERT-BILSTM-CRF

使用BERT-BILSTM-CRF进行中文命名实体识别。
291 stars 32 forks source link

运行main.py和predict.py时都出现如下警告 #32

Open Amberpollar opened 2 months ago

Amberpollar commented 2 months ago

大佬,运行时出现警告,BERT模型权重未使用。请问怎么解决?

(torchenv) D:\KG\BERT-BILSTM-CRF-main\BERT-BILSTM-CRF-main>python main.py ['O', 'B-故障设备', 'I-故障设备', 'B-故障原因', 'I-故障原因'] {'O': 0, 'B-故障设备': 1, 'I-故障设备': 2, 'B-故障原因': 3, 'I-故障原因': 4} Some weights of the model checkpoint at ./model_hub/chinese-bert-wwm-ext/ were not used when initializing BertModel: ['cls.predictions.transform.dense.bias', 'cls.seq_relationship.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.dense.weight', 'cls.seq_relationship.weight', 'cls.predictions.bias', 'cls.predi ctions.transform.LayerNorm.bias']

taishan1994 commented 2 months ago

模型是否下载了放在指定的文件夹里。

Amberpollar commented 2 months ago

1715747033626

Amberpollar commented 2 months ago

大佬说的是这个模型吗?我照着目录结构放了