Closed ssdutHB closed 6 years ago
Intuitively, the goal of the generator is to deceive the discriminator. Hence, it needs to be updated in a way the discriminator will output ones for the generated images. Instead of optimizing the original GAN objective, the way it is implemented in the release leads to more stable training. This is a common way of implementing the GAN learning algorithm. You could check out Goodfellow et al.'s NIPS'14 paper to see the description.
Thank you very much. I get it!
The code above is a part of code in cocogan_trainer.py. I think the
all_ones = Variable(torch.ones((outputs_a.size(0))).cuda(self.gpu))
should beall_zeros = Variable(torch.zeros((outputs_a.size(0))).cuda(self.gpu))
Because it calculates the loss when the inputs of Discriminator are fakeA and fakeB. Is my understanding right? Do I misunderstand it?