dcgan_code
dcgan_code copied to clipboard
How to generate a single sample?
Could someone tell me how to generate a single sample? For a single input, batchnorm changes it to [0, 0, 0...], so generated images are always the same no matter what the input is.
the only way I found was to generate a random batch of images and pick just one. You can look at my code at https://github.com/udibr/dcgan_code/blob/master/acro/train_uncond_dcgan.py it includes many generation features including filtering images that look "better" and generating GIF
HTH, Udi
this notebook has instructions on how to generate single images (with or without selection of better looking images) https://github.com/udibr/dcgan_code/blob/master/acro/one%20cool%20trick%20for%20GAN.ipynb
@udibr that's a cool trick.
@udibr Thanks man. Very helpful code and notebook. The blog post about #selfie is cool too.