define model
model = Sequential()
model.add(LSTM(128, activation='relu', input_shape=(timesteps,n_features), return_sequences=True))
model.add(LSTM(64, activation='relu', return_sequences=False))
model.add(RepeatVector(timesteps))
model.add(LSTM(64, activation='relu', return_sequences=True))
model.add(LSTM(128, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(n_features)))
model.compile(optimizer='adam', loss='mse')
model.summary()
代码如上,我需要提取一段语音序列的特征,我的理解是需要得到编码后的结果,也就是model.add(LSTM(64, activation='relu', return_sequences=False))的这一模型的输出作为特征,那么我应该怎样用代码实现这个特征输出呢?