Closed kpagels closed 4 years ago
You may want to normalize your images to [-1, 1], as the range of the generator's output is [-1, 1]. These methods do work better with more balanced data. If most of the pixels are 0, an easy solution for a generator is to produce zero everywhere, which can already achieve a very small training loss.
Thanks for your reply @junyanz . I am normalizing to [-1,1] after that. Ok it makes sense I think.
Is it because when the generator produce zeros, it looks like it does a good job? And then the discriminator will not be able to distinguish between the Generated and real image? And for this reason the discriminator returns small error to the generator?
Regarding zeros, it affects the cycle-consistency loss (in CycleGAN) and reconstruction loss (in pix2pix). If the target images have lots of zeros, and a generator learns to only predict zeros, both losses will be very small.
Thanks :)
I have a dataset that consists of 9000 Synthetic Aperture Radar images normalized to [0,1]. One of them is visualized in the histogram below. All of the images follow the same structure where most of the pixels are around 0 (e.g. 0.0235411) and only a few are approaching the maximum value (here 1). When I try to train CycleGAN, I see that the network is performing very bad and I guess this is because of the way the weights are initialized?
When I then remove the 2% percentile in the upper and lower from the image, the network performs much better. I assume the reason for this is because of the way the weights are initialized. Can any help me understand why the network trains better when the images seem to be normally distributed? And what do the initialization assume before training?
I use InstanceNormalization if that helps.