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

32x32 vs 64x64 issue

Quasimondo opened this issue · comments

When trying to train the model on a custom dataset with an image size of 64x64 pixels the discriminator loss drops to 0 after one epoch. Doing the same with a 32x32 resolution works fine. Given that CIFAR-10 is 32x32 can it be that that is the maximum resolution this particular architecture allows even though the generated example images are 64x64?

Ah I think I can answer my own question. Looks like adding another ResBlockGenerator(GEN_SIZE, GEN_SIZE, stride=2) to the generator and another ResBlockDiscriminator(DISC_SIZE, DISC_SIZE) to the discriminator fixes it for 64x64.

Thanks for your question. If you want to follow the architectures in the paper, see Tables 4, 5, 6 in Miyato et al.

Are you looking for conditional generation code? I am planning on implementing projection discriminator at some point soon. This, combined with spectral norm, should lead to the great quality you observe in the chainer code.

BTW: I follow you on Twitter. Keep up the good work!

Haha, if I was smart enough to implement a paper directly to code I wouldn't be here :-) - right now I am not looking for conditional generation code, I just want to have a higher resolution output. But it looks like adding another layer for every 2x increase works fine, and it is even possible to progressively grow it.

I am looking forward to your implementation of the projection discriminator or any other improvements you manage to add.

I am also wondering if a multi-scale discriminator like pix2pixHD uses it would be a way to improve the results.