def multimodalcompute(models, train_x):
    """Compute encoded representation for each modality in train_x using encoders in models.

    Args:
        models (list): List of encoder instances
        train_x (List): List of Input Tensors

    Returns:
        List: List of encoded tensors
    """
    outs = []
    for i in range(len(models)):
        outs.append(models[i](train_x[i]))
    return outs