当前位置:   article > 正文

OSError: Unable to load weights from pytorch checkpoint file for ‘./data/bert-base-chinese‘ at ‘.

oserror: unable to load weights from pytorch checkpoint file for '../pymodel

@ERROR :OSError: Unable to load weights from pytorch checkpoint file for ‘./data/bert-base-chinese’ at './data/bert-base-chinese/pytorch_model.bin’If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

问题描述

在跑bert模型的时候,出现加载错误

探索过程

通过百度发现这是一个普遍存在的问题

解决方案

在下面的帖子中找到解决方法:模型下载出了问题-------没有下载完全

https://blog.csdn.net/weixin_41831274/article/details/111414775

另外附上下载模型的方法:

https://blog.csdn.net/weixin_38481963/article/details/110535583

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/342936
推荐阅读
相关标签
  

闽ICP备14008679号