Skip to content

Code for "Inference Suboptimality in Variational Autoencoders"

License

Notifications You must be signed in to change notification settings

lxuechen/inference-suboptimality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}
}

About

Code for "Inference Suboptimality in Variational Autoencoders"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages