glow-pytorch icon indicating copy to clipboard operation
glow-pytorch copied to clipboard

z_list

Open ZhouCX117 opened this issue 2 years ago • 9 comments

Hi, Thanks for your nice work! I am new to the glow model, so I have some stupid questions, and I don't solve them even if I try to google.

image The flow model can translate the input $x$ to latent space code $z$ by a sequence of $h$ models. In my understanding, we only need the last output $z$ to reconstruct the input $x$. Why we don't use the learned $z$ and use a random z_list? I appreciate your answer and hope you have a good day!

ZhouCX117 avatar Apr 16 '22 15:04 ZhouCX117

If you need to reconstruct then you only need a output z lists. Random zs is used for sampling from the model.

rosinality avatar Apr 17 '22 04:04 rosinality

Thanks for your answer! Why do we need a z list rather than a single z?

ZhouCX117 avatar Apr 17 '22 07:04 ZhouCX117

For each block half of outputs splitted into z and appended to zs.

rosinality avatar Apr 18 '22 23:04 rosinality

Thanks a lot! I think I have more understanding of the glow model.

ZhouCX117 avatar Apr 19 '22 06:04 ZhouCX117

Hi, It is me again! I can't understand the self.scale = nn.Parameter(torch.zeros(1, out_channel, 1, 1)) and "out = out * torch.exp(self.scale * 3)" in the ZeroConv2d module. Could you please tell me what role this plays? I appreciate your answer!

ZhouCX117 avatar Apr 19 '22 09:04 ZhouCX117

`if args.n_bits < 8: image = torch.floor(image / 2 ** (8 - args.n_bits))

        image = image / n_bins - 0.5`

Hi, a more question. Does this code mean image=image/256-0.5? What is the good of this way?

ZhouCX117 avatar Apr 19 '22 10:04 ZhouCX117

loss = -log(n_bins) * n_pixel Hi~ Why do we need this constant loss? I appreciate your answer! Thanks a lot!

ZhouCX117 avatar Apr 19 '22 13:04 ZhouCX117

Hi, do you train the face for image_size 256*256? What is the setup of hyperparameters? I set the batch=2 and keep the other, the results are so bad.

ZhouCX117 avatar Apr 20 '22 02:04 ZhouCX117

The parallel train can't work. And if I change the n_block from 4 to 6 as suggested by the paper, the loss becomes Nan.

ZhouCX117 avatar Apr 20 '22 02:04 ZhouCX117