Downloads · 30 days
4
2% of all-time downloads
uday9k/SwissRoll_VAE
SwissRoll_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 Swiss Roll dataset.
Downloads · 30 days
4
2% of all-time downloads
All-time downloads
231
Public
Repo size
231 KB
Likes
0
Public
Click a slice to open those files.
.ipynb1.5 MB · 86%
From the Hugging Face model README
This is a Variational Autoencoder (VAE) model trained on the Swiss Roll dataset.
This repository contains a complete implementation of a Variational Autoencoder (VAE) trained on the Swiss Roll 2D manifold dataset. The model learns to encode 2D points from the Swiss Roll into a lower-dimensional latent space and decode them back, enabling both dimensionality reduction and generation of new points that lie on the Swiss Roll manifold.
The architecture is based on the implementation outlined in Auto-Encoding Variational Bayes by Diederik et al., 2022
Final Training Loss: ~6.16
Reconstruction Loss: ~3.42
KL Divergence: ~2.74
Final Validation Loss: ~5.94
Reconstruction Loss: ~3.23
KL Divergence: ~2.71
from transformers import AutoModel
import torch
import torchvision.transforms as transforms
# Load model
model = AutoModel.from_pretrained("uday9k/SwissRoll_VAE")
# Generate samples
with torch.no_grad():
z = torch.randn(1, 20) # Sample from prior
generated = model.generate(z=z)
SwissRoll_VAE_Train.ipynb: Complete implementation with training and visualizationcustomVAE_model.pth: Trained model weightsgenerated_samples: Scatter plot of generated 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 points 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 Swiss Roll},
author={Uday Jain},
year={2026},
url={https://huggingface.co/uday9k/SwissRoll_VAE}
}
This project is licensed under the MIT License - see the LICENSE file for details.
Tags: deep-learning, generative-ai, pytorch, vae, swiss-roll, unsupervised-learning
Model Card Authors: Uday Jain