File size: 567 Bytes
8c624d1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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)
|