Skip to content

Commit

Permalink
Fixup for process_x in EnsemblePosterior
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Apr 23, 2024
1 parent f0aa0f9 commit 01ede16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sbi/inference/posteriors/ensemble_posterior.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ def set_default_x(self, x: Tensor) -> "NeuralPosterior":
`EnsemblePosterior` that will use a default `x` when not explicitly
passed.
"""
self._x = x.to(self._device)
self._x = process_x(

Check warning on line 245 in sbi/inference/posteriors/ensemble_posterior.py

View check run for this annotation

Codecov / codecov/patch

sbi/inference/posteriors/ensemble_posterior.py#L245

Added line #L245 was not covered by tests
x, x_event_shape=None, allow_iid_x=self.potential_fn.allow_iid_x
).to(self._device)

for posterior in self.posteriors:
posterior.set_default_x(x)
Expand Down

0 comments on commit 01ede16

Please sign in to comment.