I'm working on the code trying to generate new images using DCGAN model. The structure of my code is from the PyTorch tutorial here. I'm a bit confused trying to find and understand how the latent vector is transforming to the feature map from the Generator part (this line of code is what I'm interested in) :
nn.ConvTranspose2d( nz, ngf * 8, 4, 1, 0, bias=False)
It means the latent vector (nz) of shape 100x1 transforming to the 512 matrices of 4x4 size (ngf=64). How does it happen? Hence, I can't even clear to myself how the length of the latent vector influence to the generated image. P.S. The left part of the Genarator structure is clear.
The only idea that I got is :
- E.g. there is a latent vector of size 100 as input (100 random values).
- We interact each value of the input latent vector with a 4x4 kernel.
- In this way we get 100 different 4x4 matrices (each matrix is for one value from latent vector).
- Then we summarize all these 100 matrices and get one final matrix - one feature map.
- We get necessary number of feature maps taking different kernels.
Is this right? Or does it happen in other way?