autoencoder / run.py
amaye15's picture
Upload run.py
8c624d1
raw
history blame
567 Bytes
from modeling_autoencoder import AutoEncoderConfig, AutoEncoder
from transformers import PretrainedConfig, PreTrainedModel, AutoConfig, AutoModel
AutoEncoderConfig.register_for_auto_class()
AutoEncoder.register_for_auto_class("AutoModel")
AutoConfig.register("autoencoder", AutoEncoderConfig)
AutoModel.register(AutoEncoderConfig, AutoModel)
AutoEncoder(AutoEncoderConfig()).push_to_hub("autoencoder")
# config = AutoConfig.from_pretrained("amaye15/autoencoder", trust_remote_code = True)
# autoencoder = AutoModel.from_config(config, trust_remote_code = True)