Open LeoWood opened 4 years ago
在hugging face下载的模型:https://cdn.huggingface.co/bert-base-chinese-pytorch_model.bin ,使用scripts中convert_bert_from_huggingface_to_uer.py,报错: Traceback (most recent call last): File "convert_bert_from_huggingface_to_uer.py", line 22, in output_model["embedding.layer_norm.gamma"] = input_model["bert.embeddings.LayerNorm.weight"] KeyError: 'bert.embeddings.LayerNorm.weight'
脚本: python convert_bert_from_huggingface_to_uer.py \ --input_model_path ../models/bert-base-chinese-pytorch_model.bin \ --output_model_path ../models/google_zh_model.bin
可以麻烦您上传huggingface bert-base-chinese模型的链接吗?
https://cdn.huggingface.co/bert-base-chinese-pytorch_model.bin
貌似还没解决呢。。。
在hugging face下载的模型:https://cdn.huggingface.co/bert-base-chinese-pytorch_model.bin ,使用scripts中convert_bert_from_huggingface_to_uer.py,报错: Traceback (most recent call last): File "convert_bert_from_huggingface_to_uer.py", line 22, in
output_model["embedding.layer_norm.gamma"] = input_model["bert.embeddings.LayerNorm.weight"]
KeyError: 'bert.embeddings.LayerNorm.weight'
脚本: python convert_bert_from_huggingface_to_uer.py \ --input_model_path ../models/bert-base-chinese-pytorch_model.bin \ --output_model_path ../models/google_zh_model.bin