Skip to content
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

z_list #40

Open
ZhouCX117 opened this issue Apr 16, 2022 · 9 comments
Open

z_list #40

ZhouCX117 opened this issue Apr 16, 2022 · 9 comments

Comments

@ZhouCX117
Copy link

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!

@rosinality
Copy link
Owner

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

@ZhouCX117
Copy link
Author

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

@rosinality
Copy link
Owner

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

@ZhouCX117
Copy link
Author

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

@ZhouCX117 ZhouCX117 reopened this Apr 19, 2022
@ZhouCX117
Copy link
Author

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
Copy link
Author

`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
Copy link
Author

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

@ZhouCX117
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants