edward2
edward2 copied to clipboard
Example code for Discrete Flows?
Would it be possible to add example code in for Discrete Flows like the demo examples from the paper? Eg. the discretized mixture of gaussians?
I am finding that the brief example listed here: https://github.com/google/edward2/blob/4270880356e720850f96fb4012510a315546fc54/edward2/tensorflow/layers/README.md
has a number of bugs. eg. it has the command flow.reverse(features)
but this throws an error because flow
is a Keras Sequential object rather than a single layer.
Thank you for any help that can be provided!
Sorry for running into that! That makes sense. The original code manually collected flows and applied reverse—it looks like we need better support for handling multiple flows. Higher-order layers like Sequential don't preserve custom methods, so an alternative might be tf.keras.Model subclassing similar to Pytorch nn modules.
No worries, if you could share the code used create the initial figures in the paper (discretized mixture of gaussians and Potts model) that would be really helpful.
I have ported Discrete Flows into PyTorch and made a few modifications in doing so but am trying to pin down bugs and have no ground truth performance to go off of.
Hi @dustinvtran I'm just bumping this again. Would be great to have some functioning example code. Thank you!
@dustinvtran I am bumping this again. It would really be great to get some example code reproducing the results from your NeurIPS paper https://arxiv.org/pdf/1905.10347.pdf. I continue to be unable to reproduce them.
@TrentBrick You are not alone in trying to recreate the NeurIPS paper's results. Please @dustinvtran, could you provide us with the example code? I really like the promise of such models in my area of research, but so far I have not been able to explore them much further.
@janfrancu I got as far as making a PyTorch library with some basic examples to try and reproduce the paper: https://github.com/TrentBrick/PyTorchDiscreteFlows. Right before COVID-19 I was corresponding with the authors about reproducing their results. They also open sourced some example code here: https://github.com/google/edward2/blob/a0f683ffc549add74d82405bc81073b7162cd408/examples/quantized_ring_of_gaussians.py that I was working with them to reproduce. I've been too busy working on COVID related things since then but would like to go back and get my library to fully reproduce their results, very open to collaborating on this.
@TrentBrick Thanks for the links. I will definitely keep in touch as it seems you have gotten further.
@janfrancu I got as far as making a PyTorch library with some basic examples to try and reproduce the paper: https://github.com/TrentBrick/PyTorchDiscreteFlows. Right before COVID-19 I was corresponding with the authors about reproducing their results. They also open sourced some example code here: https://github.com/google/edward2/blob/a0f683ffc549add74d82405bc81073b7162cd408/examples/quantized_ring_of_gaussians.py that I was working with them to reproduce. I've been too busy working on COVID related things since then but would like to go back and get my library to fully reproduce their results, very open to collaborating on this.
thank U very much,yours code is really helpful for me