Skip to content

A minimal PyTorch implementation of the VQ-VAE model described in "Neural Discrete Representation Learning".

License

Notifications You must be signed in to change notification settings

airalcorn2/vqvae-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch VQ-VAE

Open VQ-VAE in Colab

This is a minimal PyTorch implementation of the VQ-VAE model described in "Neural Discrete Representation Learning". I tried to stay as close to the official DeepMind implementation as possible while still being PyTorch-y, and I tried to add comments in the code referring back to the relevant sections/equations in the paper.

To train the model on the CIFAR-10 dataset using the same hyperparameters described in the paper, run:

python3 train_vqvae.py

It should only take a few minutes on a modern GPU (a Colab notebook can be found here). After training, the script saves the following two images:

Validation Set Samples

Reconstructions

About

A minimal PyTorch implementation of the VQ-VAE model described in "Neural Discrete Representation Learning".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages