hemingkx/CLUENER2020

运行出错,关于BertConfig

chenslcool opened this issue · 6 comments

按照readme中的python、torch版本都配置了
但是运行出错:loading weights file pretrained_bert_models/chinese_roberta_wwm_large_ext/pytorch_model.bin的时候
AttributeError: 'BertConfig' object has no attribute 'lstm_embedding_size'

可以看一下readme这一块~
model parameters
在./experiments/clue/config.json中设置了Bert/Roberta模型的基本参数,而在./pretrained_bert_models下的两个预训练文件夹中,config.json除了设置Bert/Roberta的基本参数外,还设置了'X'模型(如LSTM)参数,可根据需要进行更改。

已经解决了,谢谢!

请问怎么解决的?

按照readme中的python、torch版本都配置了 但是运行出错:loading weights file pretrained_bert_models/chinese_roberta_wwm_large_ext/pytorch_model.bin的时候 AttributeError: 'BertConfig' object has no attribute 'lstm_embedding_size'
你好,能问下怎么解决的吗

我的解决方法:直接在预训练模型的config.json中加上对应的参数和值,比如这个是768,然后还有加上lstm的dropout,我设的0.5