def compute_model_output(model, src, trg):
    """Computes output of GNMT model

    Args:
        model (`obj`:torch.nn.Module): The GNMT Model
        src (tuple): Source data point. Should be tuple of (tokens, lengths)
        trg (tuple): Target data point. Should be tuple of (tokens, lengths)
    Returns:
        `obj`:torch.Tensor: The output tensor
    """
    return model(src[0], src[1], trg[0][:-1])