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

About loss hair and loss face different from paper #22

Open
KIM7AZEN opened this issue May 7, 2024 · 0 comments
Open

About loss hair and loss face different from paper #22

KIM7AZEN opened this issue May 7, 2024 · 0 comments

Comments

@KIM7AZEN
Copy link

KIM7AZEN commented May 7, 2024

in parer loss hair is difine as

image

but in train_mapper.py this loss do not dot with hair mask.. wondering why

    loss_l2_latent = self.latent_l2_loss(w_hat, res_w)
    loss_dict['loss_l2_latent'] = float(loss_l2_latent)
    loss += loss_l2_latent * self.latent_l2_lambda

    loss_l2_img = torch.mean(((res_x - x_hat)) ** 2, dim=[0, 1, 2, 3])  ### do not dot with hair mask
    loss_dict['loss_l2_res_img'] = float(loss_l2_img)
    loss += loss_l2_img * self.img_l2_lambda_res

    loss_l2_img = torch.mean(((origin_img - x_hat) * mask) ** 2, dim=[0, 1, 2, 3])
    loss_dict['loss_l2_origin_img'] = float(loss_l2_img)
    loss += loss_l2_img * self.img_l2_lambda_origin
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