Tongjilibo / bert4torch

An elegent pytorch implement of transformers
https://bert4torch.readthedocs.io/
MIT License
1.22k stars 152 forks source link

XLnet分类报错 #154

Closed Lxhnnn closed 11 months ago

Lxhnnn commented 11 months ago

TypeError: init() missing 6 required positional arguments: 'vocab_size', 'hidden_size', 'num_hidden_layers', 'num_attention_heads ', 'intermediate_size', and 'hidden_act'

Tongjilibo commented 11 months ago

TypeError: init() missing 6 required positional arguments: 'vocab_size', 'hidden_size', 'num_hidden_layers', 'num_attention_heads ', 'intermediate_size', and 'hidden_act'

需要配置config文件的,我提供了一个convert脚本可以参考

Lxhnnn commented 11 months ago

该脚本文件在哪呢

Tongjilibo commented 11 months ago

该脚本文件在哪呢

有个convert文件夹下,你用xlnet就用convert_xlnet的就可以

Lxhnnn commented 11 months ago

好的,感谢!