Skip to content

Commit

Permalink
sum over the gamma distribution in the log_prior over last dim
Browse files Browse the repository at this point in the history
  • Loading branch information
kanodiaayush committed Dec 4, 2023
1 parent 09d3e78 commit f6e7570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bemb/model/bayesian_coefficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ def log_prior(self,
'''
out = Gamma(concentration=concentration,
rate=rate).log_prob(sample)
# drop the last dim, take the first element over the last dim
out = out[:, :, 0]
# sum over the last dimension
out = torch.sum(out, dim=-1)


# DEBUG_MARKER
Expand Down

0 comments on commit f6e7570

Please sign in to comment.