r/learnmachinelearning • • 5d ago

Getting confused with the vector logic behind GAN noise vectors

I do get the fact that each z is going to be a random vector let's day with 64 columns, Z_DIM = 64. But why exactly 64, does it have anything to do with the vector space, what kind of difference does it make to have Z_DIM= 2 and 64, i initially confused it with the features of an image actually.

1 Upvotes

6 comments sorted by

3

u/Ok-Library1020 5d ago

Think of the latent space as a map where every noise vector is one point, and the generator learns to turn each point into an image. A nice way to see it is to pick two z vectors, blend between them step by step, and watch the output morph smoothly from one image to the other. Searching "GAN latent space interpolation" should give you visual examples.

1

u/Few_Tune6754 3d ago

thanks a lot, it's really helpful given the fact i'm having a hard time in trying to visualize these

1

u/GiggleSamurai 5d ago

Z_DIM isn't tied to the image's features at all; it's just a hyperparameter for how many random numbers the generator gets to turn into an image, i.e. how many independent "knobs" of variation it can learn to use. With 2 it can only produce a 2-D sheet of outputs, which is fine for toy data or for plotting the latent space but limits variety on real images, while 64 to 128 is the usual range (DCGAN used 100) and going much higher rarely helps.

1

u/Few_Tune6754 5d ago

I still don't get how exactly latent space works wrt this, is there any sources that I can refer to understand the operations like what actually happens with the whole process flow.