In StyleGAN2 [1]}, the latent code is represented as \( w \in \mathcal {W}^{L \times D}\) , where \(L\)  is the number of layers and \(D\)  is the latent code's dimension. We declare a parameter vector \(g \in \mathbb {R}^L\) . \(g\)  is a trainable vector that masks adaptively the specific style layer.
\(g\)  ranks which of the \(L\)  layers is regulated by the softmax function. In the latent optimization step, \(g\)  and \(w\)  are multiplied according to the number of layers. \(g\)  is iteratively updated, which adaptively manipulates the latent code.
