Hadi M. Dolatabadi, Sarah Erfani, and Christopher Leckie 2020
This repository includes the Python code of AISTATS 2020 paper Invertible Generative Modeling using Linear Rational Splines. The code is mostly taken from Neural Spline Flows repository, initially downloaded on mid August 2019.
To run experiments of the paper, take the following steps:
- Install the dependencies using "./environment.yml" by running:
conda env create -f environment.yml
-
Set the path variables in "./experiments/cutils/io.py" accordingly.
-
Download the raw tabular data (Power, Gas, HEPMASS, and MiniBooNE + BSDS300) from https://zenodo.org/record/1161203#.Wmtf_XVl8eN provided by Papamakarios et al. for Masked Autoregressive Flows. Extract the data into the root "./data/".
-
Set the "DATAROOT" environment variable to the dataroot folder, namely "./data/".
-
Run "bsds300.py", "gas.py", "hepmass.py", "miniboone.py" and "power.py" one after another to extract and split the data accordingly.
-
Now, you can run each experiment of the paper by running its associated experiment:
python ./experiments/plane.py --dataset_name=rings --base_transform_type=rl-coupling
python ./experiments/face.py --dataset_name=einstein --base_transform_type=rl
python ./experiments/uci.py --dataset_name=bsds300 --base_transform_type=rl-coupling --tail_bound=3 --num_bins=8
First set the config on the associated .json file in "./experiments/image_configs/". Then run:
python experiments/images.py with experiments/image_configs/cifar-10-8bit-RL.json
To compute the BPD on the test data, run:
python experiments/images.py eval_on_test with experiments/image_configs/cifar-10-8bit-RL.json flow_checkpoint='<saved_checkpoint>'
python experiments/vae.py --prior_type=rl-coupling --approximate_posterior_type=rl-coupling
@inproceedings{dolatabadi2020lrs,
title={Invertible Generative Modeling using Linear Rational Splines},
author={Hadi Mohaghegh Dolatabadi and Sarah Erfani and Christopher Leckie},
booktitle={The 23rd International Conference on Artificial Intelligence and Statistics (AISTATS)},
pages={4236--4246},
year={2020}
}