Closed makedede closed 5 years ago
Hi, @makedede .
I want to figure out what do you mean with invertibility
.
invertibility
as the ability to reconstruct original input, you can't reconstruct the input exactly with only final z
~ N(0,1) (which is the method used in my demo). Because, there are several Split2d
layers which early output z
~ N(0,1). You have to keep recording of all early-outputed z
from Split2d
layers to fully reconstruct original input.invertibility
as the bijectiveness of modules, I think each module, asking reverse
input in my code, is reversable.Then I understand that you only make use of the coarsest scale of z for reconstruction and the blurry images make sense to me.
Hi, @chaiyujin,
Thanks for the reimplement of glow in pytorch. I think it is not bad to keep the same dimensions of Z as the input image. Reducing dimensions results in information loss. Your code is very helpful, thanks again, anyway.
@plutoyuxie Thanks for your attention. What do you mean about "keep the same dimensions of Z as the input image"? If the input image is (3, H, W), what the shape of Z in your case?
Hi, @chaiyujin,
Thanks for your response. In your case, the input image shape is (3, 64, 64) and L = 3. The total dimensions of z should be equal to 3X64X64=12,288. After discarding the first part of z (6, 32, 32) and the second part of z (12, 16, 16), only 1/4 dimensions of z (48, 8, 8) left. That leads to bad reconstruction result because of some information loss. I think it is kind of limitation for flow-based models. The large dimensions of z seem to be wasteful but necessary.
Hi Yujin,
Thanks for the nice implementation. From your reconstruction demo, it seems that the implementation cannot guarantee full invertibility of glow. Could you comment on it?
Best,
Kede