import torch


def softplus_inverse(x, beta):
    """
    Inverse of torch softplus function https://pytorch.org/docs/stable/generated/torch.nn.Softplus.html.
    """
    return (1/beta) * torch.log(torch.exp(beta*x) - 1.)