Skip to content

Page0526/PuVAE

Repository files navigation

Purifying Variational AutoEncoder

PyTorch Lightning Config: Hydra Template
Paper

Description

The Purifying Variational Autoencoder (PuVAE) is used to handle adversarial inputs and noisy data. It combines the representational power of Variational Autoencoders (VAEs) with purification mechanisms to improve resilience and accuracy in downstream tasks such as classification.

PuVAE Architecture

Experiments

I'm so busy recently so hope I can remember this and update someday :>>

Installation

Pip

# clone project
git clone https://github.com/Page0526/PuVAE
cd PuVAE

# [OPTIONAL] create conda environment
conda create -n myenv python=3.9
conda activate myenv

# install pytorch according to instructions
# https://pytorch.org/get-started/

# install requirements
pip install -r requirements.txt

Conda

# clone project
git clone https://github.com/Page0526/PuVAE
cd PuVAE

# create conda environment and install dependencies
conda env create -f environment.yaml -n myenv

# activate conda environment
conda activate myenv

How to run

Train model with default configuration

# train on CPU
python src/train.py trainer=cpu

# train on GPU
python src/train.py trainer=gpu

Train model with chosen experiment configuration from configs/experiment/

python src/train.py experiment=experiment_name.yaml

You can override any parameter from command line like this

python src/train.py trainer.max_epochs=100 data.batch_size=64

To run inference

python src/inference.py

Diary

Take me a lot of try-hard to implement this :<. Cried a lot and also learned a lot :))). Hope this repo can help you in some way. OMG, someday my future self will read this and wonder why my code was (is) so ugly :)))).

Here is our VietNamese report of this paper (Will update soon!)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published