Сама модель:
model_lstm = Sequential()
model_lstm.add(Embedding(num_words, 128, input_length=max_comment_len))
model_lstm.add(SpatialDropout1D(0.5))
model_lstm.add(LSTM(40, return_sequences=True))
model_lstm.add(LSTM(40))
model_lstm.add(Dense(6, activation='sigmoid'))
model_lstm.compile(optimizer='adam',
loss='binary_crossentropy',
metrics=['accuracy', 'AUC'])
data = pad_sequences(sequence, maxlen=max_comment_len)
result = model_lstm.predict(data)