CycleGAN-VC2
CycleGAN-VC2 copied to clipboard
Two step adversarial loss
Hey, am I missing something or the second step adverserial loss is missing in this implementation?
Hi, I am also wondering that. I think the implementation of adversarial loss is indeed missing.
yes, it indeed missed the second step adverserial loss. I add the second step adverserial loss in the branch "2nd-step-adverserial-loss"
@Jeffery-zhang-nfls Thank you for the contribution! Will look at this later.
Perhaps i misunderstood the paper but doesnt the discriminator suppose to updated as well in the second atep?
Hi @Dannynis and @Jeffery-zhang-nfls,
I am also wondering that...I thought this second step is only happening for updating the discriminator loss? Or am i misunderstanding as well?
Hi all, I thought the 2-step loss is only happening in discriminator based on paper, but the discriminator became too strong based on my experiments. Anyway, just for anyone who want to try 2-step loss....The followings are for your reference.
Here I only put one side of code for depicting clearly. You can finish another side on your own, and remember to update final generator and discriminator loss, too.
Generator 2-step loss part 1
d_cycle_A = self.discriminator_A(cycle_A)
Generator 2-step loss part 2
generator_2step_BAB = torch.mean((1 - d_cycle_B) ** 2)
Discriminator 2-step loss part 1
two_step_A = self.generator_B2A(self.generator_A2B(real_A)) d_two_step_A = self.discriminator_A(two_step_A)
Discriminator 2-step loss part 2
d_loss_A_two_step = (torch.mean((d_real_A - 1)**2) + torch.mean(d_two_step_A**2))
I think we are supposed to introduce two more networks and
. Paper clearly says in Sec 3.1 "we introduce an additional discriminator". The code currently re-uses main discriminators.
i'd fixed the problem in master branch, thanks all of you.