import torch


def ln_mul_addTH(x : torch.Tensor, alpha : torch.Tensor, beta : torch.Tensor) -> torch.Tensor:
    """
    out = x * alpha[None, :, None] + beta[None, :, None]
    """
    return x * alpha[None, :, None] + beta[None, :, None]