Skip to content

Commit

Permalink
Merge pull request #209 from danielward27/fix_numerical_inverse_log_det
Browse files Browse the repository at this point in the history
Fix numerical inverse log det
  • Loading branch information
danielward27 authored Feb 13, 2025
2 parents 5bcdc93 + 351148e commit 9c45347
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flowjax/bijections/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ def transform_and_log_det(self, x, condition=None):
def inverse_and_log_det(self, y, condition=None):
x = self.inverter(self.bijection, y, condition)
_, log_det = self.bijection.transform_and_log_det(x, condition)
return x, log_det
return x, -log_det
2 changes: 1 addition & 1 deletion tests/test_bijections/test_bijections.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
cond_shape=(),
),
"NumericalInverse": lambda: NumericalInverse(
Affine(5),
Affine(5, 2),
root_finder_to_inverter(
partial(bisection_search, lower=-1, upper=1, atol=1e-7),
),
Expand Down

0 comments on commit 9c45347

Please sign in to comment.