2017_iv_deep_radar icon indicating copy to clipboard operation
2017_iv_deep_radar copied to clipboard

fraction_loss_gan

Open houssem-tum opened this issue 5 years ago • 3 comments

Hello, in GAN.py fraction_loss_gan default value is 0,95. This means that the binary cross entropy loss has a bigger weight compared to vae loss. In the paper, an other alpha is defined, which has the value of 0.99. This means that the vae loss has a bigger weight compared to the binary cross entropy loss. Can someone please explain that for me?

houssem-tum avatar Apr 15 '19 11:04 houssem-tum

Thanks for your interest @houssem-tum! The ratio between the losses will have to be tuned based on your particular dataset. We found that they have significantly different magnitudes. I recommend computing both loss contributions on your own data and seeing what ratio is most appropriate for you.

tawheeler avatar Apr 15 '19 15:04 tawheeler

Thank you for your answer @tawheeler. I have an other question: How could you evaluate the performance of your network during and at the end of the training? The generator at the end has to be more powerful than the discriminator, right?

houssem-tum avatar Apr 18 '19 09:04 houssem-tum

That is a deep question that I am sure is still being actively researched. You don't want either the generator or the discriminator to get too good - if the generator is always fooling the discriminator, then your output is probably overfit on the training data - if the generator is never fooling the discriminator, then your output is clearly separable.

The simplest way to juggle this is to alternate between which model is trained. In our training script we simply alternate between 10 steps on each:

for step in range(1,args.nsteps):
		step = step + 1
		loss_D = train_discriminator(10)
		loss_G = train_generator(10)

I am sure there are more clever ways to go about it, but this worked reasonably well for the purpose of the research paper. Googling "how to train GANs" can probably get you a bunch of additional info.

tawheeler avatar Apr 19 '19 23:04 tawheeler