I implemented a custom version of StyleGan2 from scratch.
Now i'd like to obtain the latent vector of a particular image. I looked at the original github StyleGan2 repo on how to project images to latent space, but there is no explanation for the code used to achieve that.
From my knowledge we will have to use the generator part of the model to generate an image and compare it with the required image to create a loss value and run gradient descent to update the input latent vector, to minimize the loss.
But how do we update the input vector? As far as i know the input vector is not trainable?
Any ideas?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…