junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

Non oscillating GAN losses #1571

Open AriDeutsch opened 1 year ago

AriDeutsch commented 1 year ago

Hi,

I’ve recently been having this weird issue where my discriminator losses tend to 0 quite quickly, while my generator losses tend to 1 (see photo). My understanding of GAN’s is that the optimal solution should approach the Nash equilibrium (around 0.5 for both generator and discriminator). My GAN loss objective function is a least squares formulation, as per the options default.

I've tried lambda-identity 0.5 and 0.1, and the same phenomenon occurs.

Screen Shot 2023-05-11 at 8 29 37 pm