About a year ago I created the notebook “Generating Images of Variable Size with StyleGAN2” to try to combine a variety of different GAN algorithms and papers into a cohesive Kaggle notebook. However Tensorflow syntax has changed a lot since then, and if you were to run the notebook with version 2.15.0 it wouldn’t work, so I updated the code to run properly with the new standard.

Description:

One attractive property of diffusion models is the fact that we can generate images of different sizes by simply giving the model some noise of arbitrary size. However it shouldn’t be too difficult to get a similar result with a GAN by simply giving the generator a latent noise vector of variable size. I’ll be using a generator roughly based on StyleGAN2, a projected discriminator with differentiable augmentation and zero-centered gradient penalty, along with a relativistic GAN loss.