Skip to content

Commit 0ed0e88

Browse files
authored
Merge pull request #471 from han-ol/fix-standardze-log-det-jac
Fixed Jacobian computation of standardize transform
2 parents 55d3536 + b28ae2c commit 0ed0e88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bayesflow/adapters/transforms/standardize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def inverse(self, data: np.ndarray, **kwargs) -> np.ndarray:
123123

124124
def log_det_jac(self, data, inverse: bool = False, **kwargs) -> np.ndarray:
125125
std = np.broadcast_to(self.std, data.shape)
126-
ldj = np.log(np.abs(std))
126+
ldj = -np.log(np.abs(std))
127127
if inverse:
128128
ldj = -ldj
129129
return np.sum(ldj, axis=tuple(range(1, ldj.ndim)))

0 commit comments

Comments
 (0)