Skip to content

Commit

Permalink
fix vamp llh calculation (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjlolo authored Jul 1, 2022
1 parent b0238cf commit 1588bac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pythae/models/vamp/vamp_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ def _log_p_z(self, z):

log_p_z = (
torch.sum(
-0.5
* (prior_log_var + (z_expand - prior_mu) ** 2)
/ prior_log_var.exp(),
-0.5 * (
prior_log_var + (z_expand - prior_mu) ** 2
/ torch.exp(prior_log_var)
),
dim=2,
)
- torch.log(torch.tensor(C).type(torch.float))
Expand Down

0 comments on commit 1588bac

Please sign in to comment.