Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arturbekasov/nested_dropout_flows
Code for Ordering Dimensions with Nested Dropout Normalizing Flows paper
https://github.com/arturbekasov/nested_dropout_flows
Last synced: 3 months ago
JSON representation
Code for Ordering Dimensions with Nested Dropout Normalizing Flows paper
- Host: GitHub
- URL: https://github.com/arturbekasov/nested_dropout_flows
- Owner: arturbekasov
- Created: 2021-04-16T20:02:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-16T20:15:58.000Z (over 3 years ago)
- Last Synced: 2024-07-04T01:00:39.684Z (4 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nested Dropout Flows
Code and experiments for the paper:
> Artur Bekasov, Iain Murray, _Ordering Dimensions with Nested Dropout Normalizing Flows_.
> [[arXiv]](https://arxiv.org/abs/2006.08777)Presented at the Workshop on Invertible Neural Networks, Normalizing Flows, and Explicit Likelihood Models [[INNF+]](https://invertibleworkshop.github.io), ICML 2020.
## Dependencies
[`nflows`](https://github.com/bayesiains/nflows) package provides flow implementations.
See `requirements.txt` for other dependencies. To install all at once:
```bash
pip install -r requirements.txt
```## Usage
### Synthetic experiments
`synthetic` directory contains code for experiments with the synthetic 3D dataset.
To train a model:
```bash
python synthetic/train.py -o run_dir
```To evaluate a trained model:
```bash
python synthetic/eval.py -i run_dir
```### Image experiments
`images` directory contains code for experiments with [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) images.
To train a model:
```bash
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:
```bash
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:
```bash
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
```