Skip to content

Commit

Permalink
fix multivariate gaussian
Browse files Browse the repository at this point in the history
  • Loading branch information
t-vi committed Oct 28, 2017
1 parent f549776 commit db0bca3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 158 deletions.
2 changes: 1 addition & 1 deletion candlegp/densities.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ def multivariate_normal(x, mu, L):
num_col = 1 if x.dim() == 1 else x.size(1)
num_dims = x.size(0)
ret = - 0.5 * num_dims * num_col * float(numpy.log(2 * numpy.pi))
ret += - num_col * torch.diag(L).sum()
ret += - num_col * torch.diag(L).log().sum()
ret += - 0.5 * (alpha**2).sum()
return ret
Loading

0 comments on commit db0bca3

Please sign in to comment.