how to finetrun beit on my dataset

#2
by BoZai0813 - opened

how to slove the problem that "KeyError: 'Indexing with integers is not available when using Python based feature extractors'"?
图片.png

"""
training_args = TrainingArguments(
output_dir="beit-b0-oce",
learning_rate=6e-5,
num_train_epochs=50,
per_device_train_batch_size=1,
per_device_eval_batch_size=1,
save_total_limit=3,
evaluation_strategy="steps",
save_strategy="steps",
save_steps=20,
eval_steps=20,
logging_steps=1,
eval_accumulation_steps=5,
remove_unused_columns=False
# push_to_hub=True,
)

trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_ds,
eval_dataset=test_ds,
compute_metrics=compute_metrics
)
trainer.train()
"""
this is my code about to finetrun beit on my dataset

Sign up or log in to comment