Errors with label2id/id2label with muticlass classification

It works if you change it like this, but I’m not sure if it’s correct…:sweat_smile:

model = AutoModelForSequenceClassification.from_pretrained(model_name, config=config)
#model = AutoModelForSequenceClassification.from_pretrained(model_name, config=config, ignore_mismatched_sizes=True)

https://stackoverflow.com/questions/66148641/changing-config-and-loading-hugging-face-model-fine-tuned-on-a-downstream-task

1 Like