Skip to content

Commit

Permalink
Fixup for process_x in EnsemblePosterior (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler authored Apr 23, 2024
1 parent f0aa0f9 commit 005aeac
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(
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 005aeac

Please sign in to comment.