赞
踩
Transformers加载BERT出错。
错误:Exception has occurred: OSError Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
解决办法:把C:\Users\Administrator\.cache\huggingface\transformers下的文件删除后,重新下载加载就可以用。
如果不行,应该是版本问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。