unilm icon indicating copy to clipboard operation
unilm copied to clipboard

Using layoutlmv3 to carry out NER task, in the result of model predict, some entities only have 'I-' and no 'B-'

Open 413542484 opened this issue 3 years ago • 8 comments

output:“ O O O O O I-医院名称 I-医院名称 O I-医院名称 I-医院名称 I-医院名称 I-医院名称 I-医院名称 I-医院名称 O O O O O O O ” The dataset and input data are correct. A total of 13 entity categories

413542484 avatar Aug 02 '22 11:08 413542484

@413542484 我也遇到这个问题,你解决了吗

gjj123 avatar Aug 11 '22 05:08 gjj123

@413542484 我也遇到这个问题,你解决了吗

没解决,我在发现其他ner模型存在同样的问题,应该就是普通的模型预测错误。可以写一个简单的策略处理这种情况。

413542484 avatar Aug 12 '22 09:08 413542484

How to train NER task with layoutlmv3? Could you share the reference link?

mosay95 avatar Aug 15 '22 06:08 mosay95

The explanation here is very clear,The '-- task' parameter is the NER task by default and it can be left blank.

413542484 avatar Aug 15 '22 06:08 413542484

如何使用 layoutlmv3 训练 NER 任务?你能分享参考链接吗?

https://github.com/microsoft/unilm/blob/master/layoutlmv3/README.md The explanation here is very clear,The '-- task' parameter is the NER task by default and it can be left blank

413542484 avatar Aug 15 '22 07:08 413542484

@413542484 我也遇到这个问题,你解决了吗

没解决,我在发现其他ner模型存在同样的问题,应该就是普通的模型预测错误。可以写一个简单的策略处理这种情况。 应该是预处理的问题,按照他的dataload 里面的方法组织数据,结果是对的有B- I-

gjj123 avatar Aug 16 '22 08:08 gjj123

可以详细解释一下么,我确实改动了他dataload的代码,不过我在二分类问题上没出现这种情况,在多分类的时候才出现这个问题,你是dataload哪一部分出了问题

413542484 avatar Aug 16 '22 08:08 413542484

可以详细解释一下么,我确实改动了他dataload的代码,不过我在二分类问题上没出现这种情况,在多分类的时候才出现这个问题,你是dataload哪一部分出了问题

我调的是v3 训练的dataload 我没动应该,推理的时候 组织数据刚开始input_ids好像 没给csl 和sep ,推理也按那个dataload 里的给数据就行

gjj123 avatar Aug 16 '22 09:08 gjj123