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

Getting NaN when calculating the reconstruction loss #1

Open
CSMYang opened this issue Jul 20, 2023 · 0 comments
Open

Getting NaN when calculating the reconstruction loss #1

CSMYang opened this issue Jul 20, 2023 · 0 comments

Comments

@CSMYang
Copy link

CSMYang commented Jul 20, 2023

The reconstruction loss has numerical stability issues and will output NaN values when calculating NewInnerLog.

The calculation of NewInnerLog NewInnerLog = InnerLog / ((x_sigmoid *clipped_norm_gaussian).sum(1)) should be changed to
NewInnerLog = InnerLog / ((x_sigmoid *clipped_norm_gaussian).sum(1) + self.eps) to prevent division by zeros.

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