用ERINE训练自己的NER数据集时,F1和precision都是0
Created by: SuMarsss
跑测试的msra_ner可以跑通,f1能达到95,但是当我用ERINE跑自己的NER数据时,f1和precision都是0 测试结果:
epoch: 6, progress: 5248/6144, step: 2580, loss: 0.269858, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 3.507191 steps/s epoch: 6, progress: 5408/6144, step: 2590, loss: 0.245142, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 2.484499 steps/s epoch: 6, progress: 5568/6144, step: 2600, loss: 0.295873, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 2.440172 steps/s [dev evaluation] f1: 0.000000, precision: 0.000000, recall: 0.000000, elapsed time: 6.710833 s [test evaluation] f1: 0.000000, precision: 0.000000, recall: 0.000000, elapsed time: 6.444398 s epoch: 6, progress: 5728/6144, step: 2610, loss: 0.175324, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 0.579638 steps/s epoch: 6, progress: 5888/6144, step: 2620, loss: 0.284426, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 3.364358 steps/s epoch: 6, progress: 6048/6144, step: 2630, loss: 0.073127, f1: 0.000000, precision: 0.000000, recall: 0.000000, speed: 2.896042 steps/s
我已经按照教程里的ner数据格式整理过自己的数据集了,字符之间的特殊符号也教程里的'\x02'。 以下是我的tsv数据还有label_map.json.
胸部CT未见转移征象 B-RadiologyI-RadiologyI-RadiologyI-RadiologyOOOOOO
{ "B-AnatomyPart": 0, "I-AnatomyPart": 1, "B-Diagnosis": 2, "I-Diagnosis": 3, "B-Drug": 4, "I-Drug": 5, "B-Lab": 6, "I-Lab": 7, "B-Procedure": 8, "I-Procedure": 9, "B-Radiology": 10, "I-Radiology": 11, "O": 12 }