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

Log Z term in loss #26

Open
sh0416 opened this issue Mar 27, 2023 · 2 comments
Open

Log Z term in loss #26

sh0416 opened this issue Mar 27, 2023 · 2 comments

Comments

@sh0416
Copy link

sh0416 commented Mar 27, 2023

I think it is intended for numerical stability, but I don't know how it works.

Could you explain it or provide a reference for that code?

loss += z_loss * jax.lax.square(log_z)

@sh0416
Copy link
Author

sh0416 commented Mar 27, 2023

I think it prevents the logsumexp from being too large.. Is there any reference for doing this? or just a practical issue? I derived it to the following equation..

x_i - logsumexp(x)(1-0.0001*logsumexp(x))

@sh0416
Copy link
Author

sh0416 commented Jul 6, 2023

In the mentioned paper (https://arxiv.org/abs/2206.13517), regularization term is added to prevent the divergence.
Is it right? @enijkamp Can I get further details about the loss term?

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