-
-
Notifications
You must be signed in to change notification settings - Fork 988
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
Add tutorials using normalizing flows #3302
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two usage tutorials look great but i think it'd be much better if you first made a separate PR for Zuko2Pyro
which could sit in distributions
or in contrib.zuko.
this way this class can be tested and imported into your example notebooks
I didn't know I could do that! That would be much better. In fact, this is actually a torch-to-Pyro class (Zuko uses plain PyTorch distributions), so it could be interesting as part of |
@francois-rozet isn't |
Indeed, but the class still works if BTW, |
@fritzo do you have a preference between |
note you can put a test for your contrib code in |
@fritzo do we need to add zuko to |
@martinjankowiak I have addressed your comments (at least the ones I could). I don't think it is necessary to add zuko in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @fritzo could you please take a final pass, especially w.r.t. caching logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@francois-rozet thank you for cleaning up our existing tutorials and for adding this new tutorial! I think these will help lots of users provide exposure for Zuko. And thanks for your patience in this very slow holiday review cycle. I think we can push a Pyro 1.9 release soon after this merges.
LGTM, subject to @martinjankowiak's review and a couple nits.
I addressed your comments, and I think the tests have passed (went to bed before the end).
|
lgtm apart from possibly adding a |
I added a test already. |
sorry i missed that thanks |
🎉 |
thanks @francois-rozet !! |
This PR adds tutorials (SVI and VAE) using normalizing flows. The normalizing flow implementations are loaded from the Zuko library. By the way, I think it could be interesting to add a "compatibility with external tools" section to the examples.
In addition (as discussed in #3297), this PR also updates the normalizing flow tutorial to mention that Pyro's built-in flow API is not developed anymore. I also fixed a mistake ($\det | \frac{\partial f}{\partial x} |$ should be $| \det \frac{\partial f}{\partial x} |$ ) in the math and cleaned up a bit.