python3 tools/train.py -c configs/kie/vi_layoutxlm/ser_vi_layoutxlm_xfund_zh.yml
报错: TypeError: init() got an unexpected keyword argument 'num_classes'
python3 tools/train.py -c configs/kie/vi_layoutxlm/ser_vi_layoutxlm_xfund_zh.yml
报错: TypeError: init() got an unexpected keyword argument 'num_classes'
环境是ubuntu
Traceback (most recent call last):
File "tools/train.py", line 227, in
我把配置文件的num_classes注释了的话,又会报错:yaml.composer.ComposerError: found undefined alias 'num_classes' in "configs/kie/vi_layoutxlm/ser_vi_layoutxlm_xfund_zh.yml", line 40, column 16
I also meet the same problem. If I leave "checkpoints:" empty, this would be occur!
class_list.txt:
yml文件:
有一种说法,叫做 num_classes = 2n-1。也就是说,class_list.txt里面有3行,所以num_classes = 2 * 3 - 1 = 5
谢谢解答,我用的是开源的XFUND数据集的标签好像就是2*4-1=7,好像不是标签数目的报错
谢谢解答,我用的是开源的XFUND数据集的标签好像就是2*4-1=7,好像不是标签数目的报错 Seem the error occur in LayoutXLMForTokenClassification class, which is take 2 arguments but, in this code, 3 arguments are given.
I uninstalled paddlenlp==2.6.2 and install 2.5.2 and it work well, hope that this thing can helpful with you!
paddlenlp更新到2.6.0后出现的报错,ser和re出现了不同的问题,downgrade到2.5.2可以解决。
paddlenlp更新到2.6.0后出现的报错,ser和re出现了不同的问题,downgrade到2.5.2可以解决。
请问你的paddlepaddle-gpu版本是多少,是在aistudio平台上跑的吗
谢谢解答,我用的是开源的XFUND数据集的标签好像就是2*4-1=7,好像不是标签数目的报错
请问最后是怎么解决的,将paddlenpl降级到2.5.2吗