Open fangzhaoyi1995 opened 2 years ago
有人知道这个问题改怎么解决吗 File "F:\software\Anaconda\envs\tensor\lib\site-packages\bert4pytorch\modeling.py", line 71, in load_weights_from_pytorch_checkpoint state_dict[new_key] = state_dict.pop(old_key) KeyError: 'bert.embeddings.LayerNorm.gamma'
我也遇到了,你解决了吗
解决了,修改了了下variable_mapping里面的映射,把gamma和beta修改为weight和bias
有人知道这个问题改怎么解决吗 File "F:\software\Anaconda\envs\tensor\lib\site-packages\bert4pytorch\modeling.py", line 71, in load_weights_from_pytorch_checkpoint state_dict[new_key] = state_dict.pop(old_key) KeyError: 'bert.embeddings.LayerNorm.gamma'