Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. lstm_autoencoder = Sequential()
  2.  
  3. # Encoder
  4. lstm_autoencoder.add(LSTM(timesteps, activation='relu', input_shape=(timesteps, n_features), return_sequences=True))
  5. lstm_autoencoder.add(LSTM(16, activation='relu', return_sequences=True))
  6. lstm_autoencoder.add(LSTM(1, activation='relu'))
  7. lstm_autoencoder.add(RepeatVector(timesteps))
  8.  
  9. # Decoder
  10. lstm_autoencoder.add(LSTM(timesteps, activation='relu', return_sequences=True))
  11. lstm_autoencoder.add(LSTM(16, activation='relu', return_sequences=True))
  12. lstm_autoencoder.add(TimeDistributed(Dense(n_features)))
  13.  
  14. lstm_autoencoder.summary()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement