rpn_prior

probly.losses.torch.rpn_prior(shape: Size | tuple[int, ...], device: device) tuple[Tensor, Tensor, Tensor, Tensor][source]

Normal-Gamma prior for Regression Prior Networks from [MCPG20].

Constructs an uninformative Normal-Gamma prior used in Regression Prior Networks to regularize out-of-distribution predictions via KL divergence.

Parameters:
  • shape – Shape of the prior parameter tensors (e.g., batch shape).

  • device – Torch device on which to allocate the tensors.

Returns:

Tuple (mu0, kappa0, alpha0, beta0) of Normal-Gamma prior parameters, each with the specified shape.