import torch


def symmetrize_matrix(inp: torch.Tensor) -> torch.Tensor:
    """Symmetrize matrix in additive fashion.

    Symmetrizes A with (A + A.T)/2.

    Args:
        inp (tensor): Matrix to symmetrize.
    """
    return 0.5 * (inp + inp.transpose(-1, -2))