pi-GAN-pytorch icon indicating copy to clipboard operation
pi-GAN-pytorch copied to clipboard

A bug in mapping network structure?

Open YuDeng opened this issue 4 years ago • 3 comments

Hi, thanks for sharing the implementation of pi-gan.

I quickly go through the network part and find that there might be a bug in the mapping network: https://github.com/lucidrains/pi-GAN-pytorch/blob/0067bffdcea65feb552ee29f2c94dc59b3a545f2/pi_gan_pytorch/pi_gan_pytorch.py#L130

In my understanding, the gamma and beta for different SIREN block should be different. In the original styleGAN implementation, the gamma and beta for each AdaIN block are obtained via different fc layers. However in the implementation here, seems that gamma and beta are the same for all layers.

The original pi-gan paper does not describe this part clearly but only says that gamma and beta comes from the mapping network. I wonder if this different w.r.t the stylegan is a bug or not.

YuDeng avatar Mar 10 '21 03:03 YuDeng

I believe it is claimed in section 3.1 in the original pi-gan paper that the gammas and betas should be different for different SIREN blocks.

They use the i-th subscripts for different layers, thus the gamma_i and beta_i should also be different for different layers, otherwise the notation would just be gamma and beta.

image

ventusff avatar Mar 11 '21 07:03 ventusff

Yes, this is also what I expected. Then the implementation in this repo seems to be wrong.

YuDeng avatar Mar 11 '21 12:03 YuDeng

I'm wondering if anyone attepted to fix this issue and how's the performance?

Many thanks.

primecai avatar Apr 13 '21 14:04 primecai