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

Code Loss Formulation Vs in Paper #73

Open
Andrew-Brown1 opened this issue Jul 7, 2021 · 0 comments
Open

Code Loss Formulation Vs in Paper #73

Andrew-Brown1 opened this issue Jul 7, 2021 · 0 comments

Comments

@Andrew-Brown1
Copy link

Hi,

Thanks for the awesome repo! I had a couple of questions about the implementation of the loss function.

In the paper you multiply the entire GAN loss by the adaptive weight, lambda. The adaptive loss is a function of the entire GAN loss (L_GAN). Two questions:

  1. In the code, only the generator loss is multiplied by the adaptive weight (
    loss = nll_loss + d_weight * disc_factor * g_loss + self.codebook_weight * codebook_loss.mean()
    ).
  1. In the code, the adaptive weight, lambda, is only a function of the generator loss (whereas I thought the GAN loss was a function of both the generator and discriminator loss).

Could you offer any advice here?

Thank you

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