genforce / interfacegan

[CVPR 2020] Interpreting the Latent Space of GANs for Semantic Face Editing
https://genforce.github.io/interfacegan/
MIT License
1.51k stars 281 forks source link

What is the rationale behind sampling from the normal distribution for the W latent code, which is not a normal distribution at all? #107

Open wztdream opened 1 year ago

wztdream commented 1 year ago

Hi, In the lines below, you use randn, which represents a normal distribution, to sample latent code for W space. It appears to be unreasonable since W space is not a normal distribution. Can you please explain why this approach is used despite that? Additionally, it seems to be effective. Could you provide an explanation for its success? Moreover, why not first sample from a normal distribution and then map it to W space, which seems more reasonable?

https://github.com/genforce/interfacegan/blob/8da3fc0fe2a1d4c88dc5f9bee65e8077093ad2bb/models/stylegan_generator.py#L151-L152