I have created some new model and want to register it, so I can use AutoModelFor…() to call it.
I have read Sharing custom models, but I can’t tell the difference between
ResnetConfig.register_for_auto_class()
ResnetModel.register_for_auto_class("AutoModel")
ResnetModelForImageClassification.register_for_auto_class("AutoModelForImageClassification")
and
AutoConfig.register("resnet", ResnetConfig)
AutoModel.register(ResnetConfig, ResnetModel)
AutoModelForImageClassification.register(ResnetConfig, ResnetModelForImageClassification)
Can anyone tell me the difference and which one I should use?