Code and experiments for the paper:
Artur Bekasov, Iain Murray, Ordering Dimensions with Nested Dropout Normalizing Flows. [arXiv]
Presented at the Workshop on Invertible Neural Networks, Normalizing Flows, and Explicit Likelihood Models [INNF+], ICML 2020.
nflows
package provides flow implementations.
See requirements.txt
for other dependencies. To install all at once:
pip install -r requirements.txt
synthetic
directory contains code for experiments with the synthetic 3D dataset.
To train a model:
python synthetic/train.py -o run_dir
To evaluate a trained model:
python synthetic/eval.py -i run_dir
images
directory contains code for experiments with Fashion-MNIST images.
To train a model:
python images/train.py\
--data_dir ...\ # Where to store downloaded data
--run_dir run_dir\ # Where to store checkpoints
--reconstr_coef ... # Hyperparameters
To evaluate a trained model:
python images/eval.py\
--data_dir ...\ # Where to store downloaded data
--run_dir run_dir\ # run_dir used for train.py
--output_dir ... # Where to store the artifacts
images/eval.py
outputs:
bpd.npy
: negative log likelihood in bits-per-dimension.mse.npy
: reconstruction MSE, varying the number of dimensions dropped.
To sample from a trained model:
python images/sample.py\
--data_dir ...\ # Where to store downloaded data
--run_dir run_dir\ # run_dir used for train.py
--output_dir ... # Where to store the artifacts