Skip to content

Instantly share code, notes, and snippets.

@roboreport
Created October 19, 2019 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roboreport/dfc9353106a2b36a5c3ee1641d83963b to your computer and use it in GitHub Desktop.
Save roboreport/dfc9353106a2b36a5c3ee1641d83963b to your computer and use it in GitHub Desktop.
from keras.layers import LSTM
from keras.models import Sequential
from keras.layers import Dense
import keras.backend as K
from keras.callbacks import EarlyStopping
K.clear_session()
model = Sequential() # Sequeatial Model
model.add(LSTM(20, input_shape=(12, 1))) # (timestep, feature)
model.add(Dense(1)) # output = 1
model.compile(loss='mean_squared_error', optimizer='adam')
model.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment