from transformers import AutoConfig | |
from modeling.modeling_resnet import ResNetCustomForImageClassification | |
cfg = AutoConfig.from_pretrained("microsoft/resnet-18") | |
ResNetCustomForImageClassification.register_for_auto_class("AutoModelForImageClassification") | |
model = ResNetCustomForImageClassification(cfg) | |
model.save_pretrained("/home/fxmarty/hf_internship/tiny-testing-remote-code") | |