from keras.models import Sequential # 导入序贯模型 from keras.layers.embeddings import Embedding #导入词嵌入层 from keras.layers import Dense #导入全连接层 from keras.layers import LSTM #导入LSTM层 embedding_vecor_length = 60 # 设定词嵌入向量长度为60 lstm = Sequential() #序贯模型 lstm.add(Embedding(dictionary_size, embedding_vecor_length,