Questions about the discriminator code #120

Open
opened 2026-01-29 21:42:58 +00:00 by claunia · 0 comments
Owner

Originally created by @FeiiYin on GitHub (Dec 15, 2021).

Thanks for the impressive work!
I have several questions about the discriminator code of the training process.

The discriminator loss for the Generator part is like

l_g_gan = self.cri_gan(fake_g_pred, target_is_real=True, is_disc=False)

While the discriminator part is like

l_d = self.cri_gan(real_d_pred, target_is_real=True, is_disc=True) + self.cri_gan(fake_d_pred, target_is_real=False, is_disc=True)

Why the target_is_real option differs for fake images at two stages?

Thanks in advance!

Originally created by @FeiiYin on GitHub (Dec 15, 2021). Thanks for the impressive work! I have several questions about the discriminator code of the training process. The discriminator loss for the Generator part is like ``` l_g_gan = self.cri_gan(fake_g_pred, target_is_real=True, is_disc=False) ``` While the discriminator part is like ``` l_d = self.cri_gan(real_d_pred, target_is_real=True, is_disc=True) + self.cri_gan(fake_d_pred, target_is_real=False, is_disc=True) ``` Why the `target_is_real` option differs for fake images at two stages? Thanks in advance!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#120