a generative adversarial network is used to produce images of dogs. your approach uses the standard formulation of the minmax game where for the discriminator (d) and the generator (g), d tries to make d(g(z)) near 0, and g tries to make d(g(z)) near 1. z is randomly sampled noise over the prior distribution