more NF examples
as per issue #15
- [x] implement a set of famous NFs illustrating the usage of
NormalizingFlows.jl+Bijectors.jl(a tentative list)- [x] planar and radial flow
- [x] Real NVP
- [x] Neural Spline flow
- [x] Sparse Hamiltonian flow
@zuhengxu, can you push to merge this PR if nothing significant is standing? Thanks!
No prob! I'll get back to this PR this weekend and hopefully merge it ASAP.
Could we add a script to test whether all the example models run, e.g. on buildkite GPU?
Yes, let me clean up the Ham VI demo and then add the test script. Currently I can confirm that all the examples run on CPUs by doing
include("demo_..._fllow.jl")
Could we add a script to test whether all the example models run, e.g. on buildkite GPU?
@yebai Currently all the examples are only tested on CPUs. Do you have examples of such script (for testing runs) that I can refer to? (I did do include(...jl) manually for all the demos though.)
In terms of GPU, shall we first merge this PR and do GPU examples/test (#49) on a separate PR? the purpose this PR is just to demonstrate how to define and customize flow layers (at least for those popular flows). I think that to properly take advantage of GPU, we might want some interface adjustment.
Currently all the examples are only tested on CPUs. Do you have examples of such a script (for testing runs) that I can refer to? (I did do include(...jl) manually for all the demos though.)
It is probably okay to create a new CI group called NF Examples and include all examples there. If running all examples is time-consuming, we could run only a few iterations and not wait for the convergence. This is mainly to ensure all examples can still run with new releases or PRs.
In terms of GPU, shall we first merge this PR and do GPU examples/test (https://github.com/TuringLang/NormalizingFlows.jl/issues/49) on a separate PR?
No problem -- it sounds good!