def jaccard2dice(jaccard_val):
    """
    Calc Dice coefficient from Jaccard

    Args:
        jaccard_val (float or np.ndarray): value of Jaccard coefficient

    Returns:
        Return np.ndarray or torch.Tensor in depends of input argument type
    """
    return 2 * jaccard_val / (1 + jaccard_val)
