import torch


def outer(v1, v2):
    """Compute the outer product between two vectors.
    
    Simple wrapper to deal with several torch versions.

    Args:
        v1: The first vector.
        v2: The second vector.

    Returns:
        (torch.Tensor): The outer product.
    """
    try:
        return torch.outer(v1, v2)
    except:
        return torch.ger(v1, v2)