https://github.com/abdulfatir/planar-flow-pytorch
Pytorch implementation of Planar Flow
https://github.com/abdulfatir/planar-flow-pytorch
normalizing-flow variational-autoencoder
Last synced: about 1 year ago
JSON representation
Pytorch implementation of Planar Flow
- Host: GitHub
- URL: https://github.com/abdulfatir/planar-flow-pytorch
- Owner: abdulfatir
- License: mit
- Created: 2019-12-02T09:48:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T20:42:32.000Z (over 6 years ago)
- Last Synced: 2025-03-31T00:41:17.417Z (about 1 year ago)
- Topics: normalizing-flow, variational-autoencoder
- Language: Jupyter Notebook
- Homepage:
- Size: 183 KB
- Stars: 17
- Watchers: 2
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Planar Flow
This repo contains a Pytorch implementation of Planar Flow presented in (Rezende and Mohamed, 2015) with experiments on a 2D density and MNIST dataset.
### 2D Density Results

### MNIST Results
Input | Model | Latent Space Size | Test Lower Bound |
:--------:|:-----------------|:---:|:------:
[0,1] | VAE | 20 | -99.37
[0,1] | VAE+PF (K=20) | 20 | -98.23
{0,1} | VAE | 20 | -84.60
{0,1} | VAE+PF (K=20) | 20 | -81.83
[0,1] denotes float values between 0 and 1 and {0,1} denotes binary values.
#### Usage
Vanilla VAE: `python vae.py`
VAE with Planar Flow: `python vae-pf.py`
Add `--binary` option to binarize the input dataset.
### References
(Rezende and Mohamed, 2015) Rezende, Danilo, and Shakir Mohamed. "Variational Inference with Normalizing Flows." International Conference on Machine Learning. 2015.