Generative network understanding
latent_dim does not become of shape 16*16 


x = layers.Dense(128 * 16 * 16)(generator_input)


mean: The input of size 32 (the latent_dim) is connected to a layer of size 16*16*128


These value are decided by the data scientist, they are the hyper-parameters.
There is a lot of research on how to adjust hyper-parameters for GAN.
People use generally a size of 100 for the latent_dim but it may depends of the complexity of the image you are trying to generate.