Closed lucaslie closed 2 years ago
Hi @lucaslie, thanks for writing this up beautifully. Ours was a choice -- you might have noticed how other normalizing flow implementations hide some details behind sample
methods. We decided to show exactly which steps are necessary to sample from a CNF
. However, it's probably a good idea to add an additional comment or revert the s_span
after plotting by default so that the problem can be avoided in the future. We'd welcome your PR in that case!
Describe the bug It's not really a bug but it can kind of easily cause a bug down the line. ;)
In cell 9 and 10 of your CNF tutorials (07a and 07b) you reverse the flow of the CNF so that you can sample from it and plot it by changing
s_span
of the model:After that you never revert the flow back to its original state, which could be achieved by running:
I think it would be great to have some additional clarification about that step.
I based some on my own code on these tutorials, where after plotting the network I continued training. Obviously, the resulting network was garbage. :(
Step to Reproduce
Steps to reproduce the behavior:
Expected behavior
Have some kind of clarification about ensuring that the flow points in the right direction. Maybe there is even a way to abstract away some of the specifics from the user by providing an API to change between both "modes".