Skip to content

Commit

Permalink
fix: add x_o ConditionalPotential __call__
Browse files Browse the repository at this point in the history
  • Loading branch information
janfb committed Mar 6, 2024
1 parent 1360c05 commit 1780206
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sbi/utils/conditional_density_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,16 @@ def __init__(
self.device = self.potential_fn.device
self.allow_iid_x = allow_iid_x

def __call__(self, theta: Tensor, track_gradients: bool = True) -> Tensor:
def __call__(
self, theta: Tensor, x_o: Tensor, track_gradients: bool = True
) -> Tensor:
r"""
Returns the conditional potential $\log(p(\theta_i|\theta_j, x))$.
Args:
theta: Free parameters $\theta_i$, batch dimension 1.
x_o: Observed data $x$.
track_gradients: Whether to track gradients.
Returns:
Conditional posterior log-probability $\log(p(\theta_i|\theta_j, x))$,
Expand Down

0 comments on commit 1780206

Please sign in to comment.