I’d like to know which exact transformation is used to enforce the constraints for pyro params. For example, below I define the positive parameters of a beta. I’d like to know if, e.g., an exp transform or softplus transform is used.
import pyro
import torch
def guide_beta(x=None):
# Define the parameters, their initial values and their constraints.
a0 = pyro.param(
"a0",
torch.tensor(1.0),
constraint=torch.distributions.constraints.positive
)
b0 = pyro.param(
"b0",
torch.tensor(1.0),
constraint=torch.distributions.constraints.positive
)
# Sample the latent variable using those parameters.
prob = pyro.sample(
"prob",
pyro.distributions.Beta(a0, b0)
)