christiancosgrove / pytorch-spectral-normalization-gan

Paper by Miyato et al. https://openreview.net/forum?id=B1QRgziT-

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I generate bigger than 64x64 with this source?

bemoregt opened this issue · comments

Hi, @christiancosgrove

How can I generate bigger than 64x64 with this source?

I want to get a size of 128x128 or above sizeed image.

If Spectral Norm is good for safe training of GAN, I think that bigger sized generation is also possible..., Right?

Thanks in advance~
from @bemoregt.

Hi @bemoregt ,

If you want to generate larger images, you might have to add additional layers to the discriminator and generator. That is, in the discriminator, you have alternating stride 1 and stride 2 convolutional layers. To receive an image input of 64 (2x bigger), you'd want to add one more layer with stride 2. To generate images of size 128, you would want to add two layers with stride 2.

Same thing applies to the generator. Add 1 more layer of stride 2 (with batch norm and nonlinearity) to get a size of 64, etc.

The Miyato paper indeed uses spectral normalization to generate images larger than 32x32, so yes, this code should work to generate larger images.

Hope this helps.
Christian