import torch


def min(tensor, dim, keepdim):
    """
    Computes the minimum value of elements in input tensor.

    :param tensor: PyTorch tensor.
    :type tensor: `torch.nn.Module`
    :param dim: Reduction dimension.
    :type dim: `int`
    :param keepdim: Whether the output has `dim` retained.
    :type keepdim: `bool`
    :return: Min of input tensor.
    """
    return torch.min(tensor, dim, keepdim)[0]