https://github.com/drawcodeboy/vae
Variational Autoencoder (VAE), Evidence Lower Bound (ELBO) Implementation (PyTorch)
https://github.com/drawcodeboy/vae
elbo implementation pytorch vae
Last synced: 11 months ago
JSON representation
Variational Autoencoder (VAE), Evidence Lower Bound (ELBO) Implementation (PyTorch)
- Host: GitHub
- URL: https://github.com/drawcodeboy/vae
- Owner: drawcodeboy
- Created: 2024-12-28T07:03:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T12:03:55.000Z (12 months ago)
- Last Synced: 2025-03-25T02:51:37.121Z (12 months ago)
- Topics: elbo, implementation, pytorch, vae
- Language: Python
- Homepage:
- Size: 546 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VAE Implementation with PyTorch
## Description
* This is Variational Autoencoder(VAE) Implementation with PyTorch!
## Preview: CelebA
### (1) Reconstruction
### (2) Generation
## Preview: MNIST
### (1) Reconstruction
### (2) Generation
### (3) Latent Space t-SNE
## Installation
```
# Docker (Optional)
docker pull ubuntu:22.04
docker run -itd --gpus=all --shm-size=16G --name=vae ubuntu:22.04 /bin/bash
apt-get update
apt-get install sudo
sudo apt-get install git
sudo apt-get install gdown # For CelebA Dataset
sudo apt-get install unzip
sudo apt-get install -y libgl1-mesa-glx # OpenCV
sudo apt-get install -y libglib2.0-0 # OpenCV
# Download
git clone https://github.com/drawcodeboy/VAE.git
cd VAE
# Download CelebA
gdown --id 1m8-EBPgi5MRubrm6iQjafK2QMHDBMSfJ --output data/
unzip data/celeba.zip -d data/
unzip data/celeba/img_align_celeba.zip -d data/celeba/
# Install Python
sudo apt-get install python3
sudo apt-get install python3-venv
# Virtual Environment
python3 venv -m .venv
source .venv/bin/activate
# Install packages
pip install -r requirements.txt
# train MNIST
python train.py --config=vae.mnist
# train CelebA
python train.py --config=vae.celeba
# test MNIST
python test.py --config=vae.mnist
# test CelebA
python test.py --config=vae.celeba
```
## References
1. VAE: Kingma, D. P. (2013). Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114.