Transformer-based-pretrained-model-for-event-extraction icon indicating copy to clipboard operation
Transformer-based-pretrained-model-for-event-extraction copied to clipboard

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.

Open sunsunshinesunshine opened this issue 4 years ago • 2 comments

请问出现在跑这个代码的时候出现如下问题要怎么解决呢 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.

sunsunshinesunshine avatar Apr 24 '20 10:04 sunsunshinesunshine

你好请问你解决了吗?

yysirs avatar Oct 16 '20 06:10 yysirs

这个是模型的加载问题,从官网上下模型,from_pretrained加载即可

wangbofan avatar Apr 17 '23 06:04 wangbofan