我试着用蒸馏器分类器。但是我得到了下面的错误。
这是我的代码
(X_train,y_train),(X_test,y_test),prepro
=text.texts_from_df(train_df=data_train,text_column="Cleaned",label_columns=col
,val_df=data_test,maxlen=500,preprocess_mode="distilbert")下面是错误
OSError: Model name 'distilbert-base-uncased' was not found in tokenizers model name list (distilbert-base-uncased, distilbert-base-uncased-distilled-squad, distilbert-base-cased, distilbert-base-cased-distilled-squad, distilbert-base-german-cased, distilbert-base-multilingual-cased). We assumed 'distilbert-base-uncased' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.txt'] but couldn't find such vocabulary files at this path or url._由于我的办公室目前的环境问题,我只能在tf 2.2和python 3.8上工作。现在我使用的是0.19。
你觉得如果我把它降到0.16会影响我现在的环境吗?
发布于 2020-08-10 09:55:11
如果网络或防火墙问题阻止下载令牌器文件,则可能会发生此错误。有关补救措施,请参阅this FAQ entry。
此外,当您使用preprocess_mode='distilbert'时,texts_from*函数返回TransformerDataset实例,而不是数组。例如,您需要用train_data替换(X_train, y_train)。参见this example notebook。
https://stackoverflow.com/questions/63311002
复制相似问题