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

Make beta tc loss more stable using torch.logsumexp #41

Merged
merged 8 commits into from
Nov 14, 2022

Conversation

meffmadd
Copy link
Contributor

The code is from https://github.com/YannDubs/disentangling-vae
The PyTorch implementation uses a more stable implementation than just chaining .log().sum.exp()

@meffmadd
Copy link
Contributor Author

Will also look into using torch.Normal for _betatc_compute_gaussian_log_density.

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 70.04% // Head: 70.04% // No change to project coverage 👍

Coverage data is based on head (1446fd8) compared to base (de159f2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   70.04%   70.04%           
=======================================
  Files         135      135           
  Lines        7538     7538           
=======================================
  Hits         5280     5280           
  Misses       2258     2258           
Impacted Files Coverage Δ
disent/frameworks/vae/_unsupervised__betatcvae.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nmichlo
Copy link
Owner

nmichlo commented Nov 14, 2022

Sorry, for the delay getting back to you about this PR.

Good catch! Thank you so much for this contribution!

EDIT: I notice the old contributions are still part of the history, if there is anything in future it might be easier to start the commits from the main branch after synchronizing with upstream changes 😁

@nmichlo nmichlo merged commit ff462ba into nmichlo:main Nov 14, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants