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
A bug in bitsback coding #10
Comments
Nice find, thank you! I'll double check once I get a few minutes and fix the notebook and blog post up. |
@bjlkeng Thank you for the detailed introduction and concise code. It helped me understand bitsback encoding very well |
Thanks for finding the bug @bfs18 ! I fixed the bug you mentioned and then realized I had some more issues with the encoding/decoding of the latent variables. So I fixed those too, and now I can achieve 1.53 bits/pixel! Much better (although not as good as the original paper). See: https://github.com/bjlkeng/sandbox/tree/master/bitsback I also updated the blog post too for those who come across it in the future: https://bjlkeng.io/posts/lossless-compression-with-latent-variable-models-using-bits-back-coding/ Thanks again for finding that bug! |
sandbox/bitsback/bitsback.py
Line 29 in 3dac794
scale should be standard deviation, not variance. changing scale to
scale=np.exp(0.5. * log_var)
improves the result a lot.The text was updated successfully, but these errors were encountered: