我正试图在Google上实现XLNET。但我得到了以下问题。
ImportError:
XLNetTokenizer requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
that match your environment.我还尝试了以下步骤:
!pip install -U transformers
!pip install sentencepiece
from transformers import XLNetTokenizer
tokenizer = XLNetTokenizer.from_pretrained('xlnet-base-cased-spiece.model')谢谢你提前提供帮助。
发布于 2021-01-06 16:50:23
在
!pip安装变压器和!pip安装
请重新启动运行时,然后执行所有其他代码。
发布于 2022-09-11 08:56:29
我在google中也遇到了同样的错误。重新启动运行时是为我做的。
https://stackoverflow.com/questions/65557918
复制相似问题