I was learning about GAN's and how it can be used for creating images of cat, dog, mouse and bird. This is how I think in supervised learning system we train the features and labels to generate images.

cat,dog,mouse, bird = 0,1,2,3

X  Y
1  dog.jpg
3  bird.jpg
0  cat.jpg
0  cat1.jpg
.  .
.  .


after training for generating a image

predict(0) #generates cat image
predict(2) #generates mouse image

Because GAN is an unsupervised learning system it learns to generate images using adversarial training. What I have seen in others implementation of GANs is that they add a noise as an input to the generator. The noise is generally a continuous number between 0 and 1. Why do they add random number as noise? why cant they simply add some numbers for example cat,dog,mouse, bird = [0,1,2,3]?

enter image description here


1 Answer 1


The way you can think of noise is as an embedding which has information about the texture, the style, orientation etc. And the task of the generator is to use this embedding and figure out a way to map these embeddings to Image space. As far as your questions go,if we only use label [0,1,2,3] you are making it a deterministic problem and forcing it to generate only one image. Thats not what we want from the GAN.We want to generate multiple images of the same class.

  • $\begingroup$ By embedding, do you also mean that in a topological sense? That would make sense how you'd take the attributes/information of the noise and to generate new images. $\endgroup$ Commented Aug 9, 2019 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.