YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

⏰ Clock-VAE-Color-140x

νŠΉμ • μ‹œκ°„μ˜ μ•„λ‚ λ‘œκ·Έ μ‹œκ³„ 이미지λ₯Ό μƒμ„±ν•˜κΈ° μœ„ν•΄ μ„€κ³„λœ Conditional VAE λͺ¨λΈμž…λ‹ˆλ‹€.
A Conditional VAE tailored for generating analog clock images that represent specific times.


πŸ“› Naming Convention

  • clock-vae: λͺ¨λΈ 이름 (Model name)
  • color: 이미지 μœ ν˜• (Image type: color or mono)
  • 140x: 이미지 크기 (Image size: 140x140)
  • v1: λͺ¨λΈ 버전 (Model version)

πŸ”§ Model Definition Code

class ConditionalVAE(nn.Module):
    def __init__(self, input_dim, condition_dim, latent_dim):
        super(ClockVAEHandler.ConditionalVAE, self).__init__()
        self.encoder = nn.Sequential(
            nn.Linear(input_dim + condition_dim, 512),
            nn.ReLU(),
            nn.Linear(512, 256),
            nn.ReLU(),
            nn.Linear(256, 128),
            nn.ReLU(),
        )
        self.fc_mu = nn.Linear(128, latent_dim)
        self.fc_logvar = nn.Linear(128, latent_dim)
        self.decoder = nn.Sequential(
            nn.Linear(latent_dim + condition_dim, 128),
            nn.ReLU(),
            nn.Linear(128, 256),
            nn.ReLU(),
            nn.Linear(256, 512),
            nn.ReLU(),
            nn.Linear(512, input_dim),
            nn.Sigmoid()
        )

    def encode(self, x, condition):
        x = x.view(x.size(0), -1)
        condition = condition.view(condition.size(0), -1)
        x_cond = torch.cat([x, condition], dim=1)
        h = self.encoder(x_cond)
        mu = self.fc_mu(h)
        logvar = self.fc_logvar(h)
        return mu, logvar

    def reparameterize(self, mu, logvar):
        std = torch.exp(0.5 * logvar)
        eps = torch.randn_like(std)
        return mu + eps * std

    def decode(self, z, condition):
        z_cond = torch.cat([z, condition], dim=1)
        return self.decoder(z_cond)

    def forward(self, x, condition):
        mu, logvar = self.encode(x, condition)
        z = self.reparameterize(mu, logvar)
        return self.decode(z, condition), mu, logvar
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.