我是靠谱客的博主 贪玩寒风,这篇文章主要介绍AttributeError: type object ‘BertConfig‘ has no attribute ‘pretrained_config_archive_map‘,现在分享给大家,希望可以做个参考。
这个应该是版本的问题,更换一下版本。
pip install transformers==2.0.0
或者:
try
$from transformers import ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
or
$from transformers import BERT_PRETRAINED_CONFIG_ARCHIVE_MAP
参考链接:
https://github.com/huggingface/transformers/issues/5848
https://github.com/huggingface/transformers/issues/5848
最后
以上就是贪玩寒风最近收集整理的关于AttributeError: type object ‘BertConfig‘ has no attribute ‘pretrained_config_archive_map‘的全部内容,更多相关AttributeError:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复