tiny-testing-remote-code / create_model.py
Felix Marty
fix againg
cd555aa
raw
history blame
389 Bytes
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")