def load_generated_data(file_path, T, N):
    """
    Load Generator generated data that each line represents a sample (paragraph).
    Every sample has T * N tokens.
    # Arguments:
        file_path: str
        T: int, number of sentence in a sample (paragraph)
        N: int, number of words in a sentence
    # Returns:
        n_data: int, number of rows (sample) in file
        data: list, shape = (n_data, number of sentences in each row, number of words in each sentence)
    """
    data = []
    with open(file_path, 'r', encoding='utf-8') as f:
        for line in f:
            paragraph = line.strip().split()
            if len(paragraph) != T * N:
                raise ValueError("expected sample length %d but get %d" % (T * N, len(paragraph)))
            paragraph = [paragraph[x:x+N] for x in range(0, len(paragraph), N)] # (T, N)
            data.append(paragraph)
    
    return len(data), data