dcgan_code icon indicating copy to clipboard operation
dcgan_code copied to clipboard

How to generate a single sample?

Open falcon000 opened this issue 9 years ago • 4 comments

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.

falcon000 avatar Dec 16 '15 12:12 falcon000

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

udibr avatar Dec 16 '15 13:12 udibr

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 avatar Dec 16 '15 15:12 udibr

@udibr that's a cool trick.

soumith avatar Dec 16 '15 16:12 soumith

@udibr Thanks man. Very helpful code and notebook. The blog post about #selfie is cool too.

falcon000 avatar Dec 16 '15 23:12 falcon000