Skip to content
Code for "Inference Suboptimality in Variational Autoencoders"
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
datasets
utils
.gitignore
LICENSE
README.md
bdmc.py
cvae.py
loader.py
local_ffg.py
local_flow.py
run.py
vae.py

README.md

inference-suboptimality

Code regarding evaluation for paper Inference Suboptimality in Variational Autoencoders. [arxiv]

Dependencies

  • python3
  • pytorch==0.2.0
  • tqdm

Training

To train on MNIST and Fashion, unzip the compressed files in folder datasets/.

python run.py --train --dataset <dataset> (--lr-schedule --warmup --early-stopping)

To train on CIFAR, set the argument for the dataset flag to cifar. The dataset should be downloaded automatically, if not already downloaded.

Evaluation

  • IWAE: python run.py --eval-iwae --dataset <dataset> --eval-path <ckpt path>
  • AIS: python run.py --eval-ais --dataset <dataset> --eval-path <ckpt path>
  • Local FFG: python local_ffg.py --dataset <dataset> --eval-path <ckpt path>
  • Local Flow: python local_flow.py --dataset <dataset> --eval-path <ckpt path>
  • BDMC: python bdmc.py --eval-path <ckpt path> --n-ais-iwae <num samples> --n-ais-dist <num dist>

Other Experiments

For decoder size, flow affect amortization, test set gap and other experiments, refer to this.

Citation

If you use our code, please consider cite the following: Chris Cremer, Xuechen Li, David Duvenaud. Inference Suboptimality in Variational Autoencoders.

@article{cremer2018inference,
  title={Inference Suboptimality in Variational Autoencoders},
  author={Cremer, Chris and Li, Xuechen and Duvenaud, David},
  journal={ICML},
  year={2018}
}
You can’t perform that action at this time.