Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about calculating the discriminator loss. #10

Open
syguan96 opened this issue Dec 16, 2024 · 0 comments
Open

Question about calculating the discriminator loss. #10

syguan96 opened this issue Dec 16, 2024 · 0 comments

Comments

@syguan96
Copy link

Hi @LeslieZhoa , thanks for sharing the code organized with a more clean structure. When reading the code, I'm confused by one code block (shown below). When computing d_loss of eye discriminators, you use PartGANLoss to calculate the real_score but use GANLoss to calculate the fake score. Could you please explain why not using the same criterion?

            # left eye
            fake_d_pred,_ = self.left_eye_d(fake_left_eyes.detach())
            real_d_pred,_ = self.left_eye_d(real_left_eyes)
            real_left_eye_score = self.PartGANLoss(real_d_pred,True, is_disc=True)
            fake_left_eye_score = self.GANLoss(fake_d_pred, False, is_disc=True)
            l_d_left_eye = real_left_eye_score + fake_left_eye_score 
            l_d += l_d_left_eye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant