First, we feed the noise, and the code, to the generator, and it will output the fake image according to the equation :
fake_x = generator(c, z)
Now we feed the real image, , to the discriminator, , and get the probability that the image being real. Along with this, we also obtain the estimate of for the real image:
D_logits_real, c_posterior_real = discriminator(x)
Similarly, we feed the fake image to the discriminator and get the probability of the image being real and also the estimate of for the fake image:
D_logits_fake, c_posterior_fake = discriminator(fake_x,reuse=True)