import torch


def double_features(f: torch.Tensor) -> torch.Tensor:
    """Double feature vector as (A, B, C, D) --> (A, A, B, B, C, C, D, D)

    Args:
        f: Feature vectors (n_batch, n_features)
    Returns:
        f: Feature vectors (2*n_btach. n_features)
    """
    return torch.repeat_interleave(f, 2, dim=0)