sbi.utils.transformed_potential

sbi.utils.transformed_potential#

transformed_potential(theta, potential_fn, theta_transform, device, track_gradients=False)[source]#

Return potential after a transformation by adding the log-abs-determinant.

In addition, this function takes care of moving the parameters to the correct device.

Parameters:
  • theta (Tensor | ndarray) – Parameters $ heta$ in transformed space.

  • potential_fn (Callable) – Potential function.

  • theta_transform (Transform) – Transformation applied before evaluating the potential_fn

  • device (str) – The device to which to move the parameters before evaluation.

  • track_gradients (bool) – Whether to track the gradients of the potential_fn evaluation.

Return type:

Tensor