The generator takes the feature as input and produces a new output which is compared to the input \(\textbf {x}\) . The discriminator is trained as a generative adversarial network, evaluating the probability that \(G(\mathbf {\hat{r}})\)  is real or fake. The generator is updated by receiving gradients from the discriminator. For more stable training, we use the least square loss for the discriminator [1]}. Alternatively, we can use the Wasserstein GAN formulation [2]}, which replaces the discriminator by a critic network that measures the score of the
“realness” of an image.
