Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlanarFlow #1515

Merged
merged 24 commits into from
Nov 28, 2018
Merged

PlanarFlow #1515

merged 24 commits into from
Nov 28, 2018

Conversation

stefanwebb
Copy link
Contributor

Implementation of the simple PlanarFlow (from "Variational inference with normalizing flows")

Copy link
Collaborator

@martinjankowiak martinjankowiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the pr!

have you used this in some context to fit some distribution?

pyro/distributions/iaf.py Show resolved Hide resolved
pyro/distributions/planar.py Outdated Show resolved Hide resolved
@stefanwebb
Copy link
Contributor Author

Do you mean have I tested it out for learning distributions? Or rather, what would be a motivation for including it in the library? I should test it out for learning a simple distribution, although the Jacobian passes... I think it's important to have PlanarFlow because it's a baseline for other flows in the literature, like Sylvester flow

@martinjankowiak
Copy link
Collaborator

@stefanwebb

Do you mean have I tested it out for learning distributions?

yes

@stefanwebb
Copy link
Contributor Author

Let me test it out before we proceed

@stefanwebb
Copy link
Contributor Author

Sorry for the delay! I've been able to learn densities from Table 1/Figure 3 of "Variational Inference with Normalizing Flows" so I'm confident that PlanarFlow works. E.g.:

True U1: test_potential.pdf
PlanarFlow U1 with K=32 : learnt_potential.pdf

@stefanwebb
Copy link
Contributor Author

I've changed this commit to used the new TransformModule class, so I think it's good to go

Copy link
Member

@fritzo fritzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Software-wise this looks fine to me. @martinjankowiak can you confirm the math is sane 😄

@martinjankowiak
Copy link
Collaborator

thanks @stefanwebb !

@martinjankowiak martinjankowiak merged commit 43155bf into pyro-ppl:dev Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants