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
Flow not perfectly invertible #45
Comments
Glow has a downsample layer which just throws away a half of data (along channel). In the reverse process, the threw-away part is sampled from a prior. You can modify the codes to keep those threw-away parts and replace them with the sampling process, then you can get a perfectly inverted results. |
Hi, do you have solved this problem? could you share that? thanks a lot! |
Hi, I once suspect that there is something wrong with this code, but I re-read the code carefully and notice this line: https://github.com/rosinality/glow-pytorch/blob/master/model.py#L301 So your code can be modified to the following:
|
Thanks, it works. |
Hi, given an input image tensor x and extracting the glow model i tried the following:
latent = glow(x)[2]
x_reconstructed = glow.reverse(latent)
Since it is a normalizing flow one would expect, that x_reconstructed is very similar to x, since the only source of errors should be rounding errors. However, I observe very big differences. Does anybody has an explanation for that?
The text was updated successfully, but these errors were encountered: