In the controllable image synthesis, we are manipulating a noise vector z such that our generator ( in our GAN model ) creates images that the desired feature exists. For instance, take the feature of "smiling". In order to learn how to change the z (noise) vector , the technique is described as following :
Train a classifier ( besides the GAN model, just a single discriminator neural networks as a classifier) that classifies an face image according whether there is a smiling person on the image or not.
Give the image generated by the GAN model with the initial noise ( say z1) to the classifier.
Compute gradients of the score with respect to z1. And finally Perform gradient ascent on z1 vector in the direction of improving the score.
I cannot understand how to gradients are used to change the z1 vector in a way that it now leads the GAN model to create "smiling" faces, could you please help ?