我正在对自定义(使用 HuggingFace)数据集进行微调预训练模型我将从一个 youtube 视频中正确复制所有代码,一切正常,但在此单元格/代码中:
with training_args.strategy.scope():
model=TFDistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")
trainer = TFTrainer(model=model, # the instantiated Transformers model to be trained
args=training_args, # training arguments, defined above
train_dataset=train_dataset, # training dataset
eval_dataset=test_dataset) # evaluation dataset
trainer.train()
它会给我这个错误:
TypeError: '>' not supported between instances of 'NoneType' and 'int'