toannhu / naf_examples

examples of Neural Autoregressive Flows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Examples of the ICML paper: Neural Autoregressive Flows

To reproduce the experiments done in the paper, please refer to this repo.

  • To use this repo, please also clone this one to the parent directory.

  • The snippet in can be summarized in three steps after choosing a data distribution the learn:

    1. initialize the model
    2. fitting the distribution
    3. visualize the learned model

For example:

denaf = naf.DensityEstimator(flowtype=1), 2000)
fig = naf.visualize2D(distr, denaf, res=res, rng=rng)

For the swissroll distribution one would learn the following density model (right) using Deep Sigmoidal Flow, a neural transformer. The true data distribution is visualized on the left as a comparison.

alt text

Below is the result using affine transformer (aka the IAF by Kingma et al. 2016)

alt text


examples of Neural Autoregressive Flows


Language:Python 100.0%