Referring to the blog, Image Completion with Deep Learning in TensorFlow, it clearly says that we would want a generator $g$ whose modeled distribution fits our dataset $data$, in other words, $P_{data}=P_g$.

But, as described earlier in the blog, the space $P_{data}$ is in is a higher-dimensional space, where a dimension represents a particular pixel in an image, making it a $64*64*3$ dimensional space (in this case). I have a few questions regarding this

  1. Since each pixel here will have an intensity value, will the pdf try to encapsulate a unique pdf for each pixel?
  2. If we sample the most likely pixel value for each pixel, considering the distributions need not be the same for each pixel, is it not quite likely that the most probabilistic generated image is just noise apart from things like a common background or so?
  3. If $P_g$ is trying to replicate $P_{data}$ only, does that mean a GAN only tries to learn lower level features that are common in the training set? Are GANs clueless about what its doing?
  • $\begingroup$ Addition to Q2 - If not noise should it not produce the exact same image if that image with highest probabilities happens to exist? $\endgroup$
    – ashenoy
    Jul 19, 2019 at 11:24
  • $\begingroup$ General Addition - Is my understanding even in the right direction in the first place? $\endgroup$
    – ashenoy
    Jul 19, 2019 at 11:25
  • $\begingroup$ Hi. Please, next time ask one question per post! $\endgroup$
    – nbro
    Jul 20, 2019 at 13:40

1 Answer 1



  1. No, generally GANs model the joint distribution of pixel space. The space is so entangled that it would be very difficult to model a singular pixels PDF.
  2. This question doesn't make sense given the first question's answer. You do NOT sample singular pixels, you sample the joint.
  3. $P_g$ is trying to model $P_{data}$, so that's your goal, so yes it will find features in the training set. Ideally, though it can extrapolate usage of the features to generate new images. But, yes depending on your setup you can end up with overfitting or mode-collapse where you really only generate a small subset of images that trick the discriminator. So I would say, no, the GAN doesn't know what its doing (since its just a minimax optimization of a loss you setup), so your goal is to tell it what to do in a way to achieve your best result.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .