承前 接上节代码『TensotFlow』RNN中文文本_上, import numpy as np import tensorflow as tf from collections import Counter poetry_file = 'poetry.txt' poetrys = [] with open(poetry_file, 'r', encoding='utf-8') as f: for line in f: try: title, content = line.strip().sp…