Downloads · 30 days
12
8% of all-time downloads
uday9k/Gaussian_MNIST_VAE
Gaussian_MNIST_VAE is a machine learning model from uday9k. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a Variational Autoencoder (VAE) model trained on the MNIST dataset.
Downloads · 30 days
12
8% of all-time downloads
All-time downloads
153
Public
Repo size
2.1 MB
Likes
0
Public
Click a slice to open those files.
.ipynb903 KB · 52%
From the Hugging Face model README
This is a Variational Autoencoder (VAE) model trained on the MNIST dataset.
This repository contains a complete implementation of a Variational Autoencoder (VAE) trained on the MNIST handwritten digits dataset. The model learns to encode images into a 20-dimensional latent space and decode them back to reconstructed images, enabling both data compression and generation of new digit-like images. The architecture is based on the implementation outlined in Auto-Encoding Variational Bayes by Diederik et al., 2022
from transformers import AutoModel
import torch
import torchvision.transforms as transforms
# Load model
model = AutoModel.from_pretrained("uday9k/Gaussian_MNIST_VAE")
# Generate samples
with torch.no_grad():
z = torch.randn(1, 20) # Sample from prior
generated = model.generate(z=z)
# Reshape to image
image = generated.view(28, 28).cpu().numpy()
MNIST_VAE_Train Continous.ipynb: Complete implementation with training and visualizationcustomVAE_model2.pth: Trained model weightsgenerated_samples: Grid of generated digit samples as part of notebooklatent_space_visualization: 2D latent space plot as part of notebookreconstruction_comparison: Original vs reconstructed images as part of notebooklatent_interpolation: Interpolation between digit pairs as part of notebookcomprehensive_training_curves: Training loss curves as part of notebookThis VAE implementation can be used for:
This implementation serves as an excellent educational resource for:
If you use this implementation in your research or projects, please cite:
@misc{vae_mnist_implementation,
title={Variational Autoencoder Implementation for MNIST},
author={Uday Jain},
year={2026},
url={https://huggingface.co/uday9k/Gaussian_MNIST_VAE}
}
This project is licensed under the MIT License - see the LICENSE file for details.
Tags: deep-learning, generative-ai, pytorch, vae, mnist, computer-vision, unsupervised-learning
Model Card Authors: Uday Jain