Skip to content

Code for Ordering Dimensions with Nested Dropout Normalizing Flows paper

Notifications You must be signed in to change notification settings

arturbekasov/nested_dropout_flows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nested Dropout Flows

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.

Dependencies

nflows package provides flow implementations.

See requirements.txt for other dependencies. To install all at once:

pip install -r requirements.txt

Usage

Synthetic experiments

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

Image experiments

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 

About

Code for Ordering Dimensions with Nested Dropout Normalizing Flows paper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages