maxjcohen / vqvae

VQ-VAE implementation in pytorch, supporting EMA and Gumbel trainings. Applicable for images and time series.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VQ-VAE

This repo contains an implementation of the VQ-VAE in the vqvae package. The only requirement is torch. Additionally are implemented various training and logging scripts in the src and scripts packages, for which the requirements libraries are listed in the requirements.txt file.

The master branch is considered to be stable, installation is simply:

pip install git+https://github.com/maxjcohen/vqvae

About normalization

Images dataset are traditionnally normalized by rescaling every pixel value between 0 and 1, by dividing every image by 255. Altough this method doesn't change much when training classic or ema codebooks, the gumbel implementation requires proper normalization, i.e. centered data with unit variance, in order for the balance between the likelihood and the KL terms to be respected.

About

VQ-VAE implementation in pytorch, supporting EMA and Gumbel trainings. Applicable for images and time series.


Languages

Language:Jupyter Notebook 92.3%Language:Python 7.6%Language:Shell 0.0%