Skip to content

Commit 8fbf737

Browse files
committed
fix sum dims
1 parent 82b3ab4 commit 8fbf737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayesflow/distributions/diagonal_normal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def log_prob(self, samples: Tensor, *, normalize: bool = True) -> Tensor:
9191
result = -0.5 * ops.sum((samples - self._mean) ** 2 / self._std**2, axis=-1)
9292

9393
if normalize:
94-
log_normalization_constant = -0.5 * ops.sum(self.dims) * math.log(2.0 * math.pi) - ops.sum(
94+
log_normalization_constant = -0.5 * np.sum(self.dims) * math.log(2.0 * math.pi) - ops.sum(
9595
ops.log(self._std)
9696
)
9797
result += log_normalization_constant

0 commit comments

Comments
 (0)