fix a typo bug where 'id2label' was incorrectly written as 'i2label' when reading config (#34637)

fix a bug where 'id2label' was incorrectly written as 'i2label' when reading the config from pretrained config
This commit is contained in:
ZuoChen_BUPT 2024-11-18 21:41:48 +08:00 committed by GitHub
parent eb0ab3ed4b
commit c772d4d91e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,7 +331,7 @@ def main():
config = AutoConfig.from_pretrained(
args.model_name_or_path,
num_labels=len(labels),
i2label=id2label,
id2label=id2label,
label2id=label2id,
finetuning_task="image-classification",
trust_remote_code=args.trust_remote_code,