This is an implementation of Vector Quantized Variational Autoencoder for the final project of ECE 176: Introduction to Deep Learning & Applications at UC San Diego.
First, ensure you have a clean Python distribution that has version >=3.11. One way of doing it is through miniconda:
conda create --name vqvae python=3.12
conda activate vqvaeThen, you can install poetry:
pip install poetryFinally, install the dependencies and the package itself:
poetry installTo download the CelebA dataset, you might need the library gdown. You can install it with:
poetry install --with downloadwhen installing the package.
To train the model, you can run (assuming you're in the root of the repository):
python scripts/train/cifar10.py
python scripts/train/celeba.pyThe hyperparameters can be changed directly in the script files. The results will be saved in the logs directory.