Last active
March 15, 2020 07:36
-
-
Save lylayang/971b7b14e4fe6040d8c28b9caab59ffe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Dense, LSTM, Dropout | |
from keras.callbacks import EarlyStopping | |
def model_lstm(look_back): | |
model=Sequential() | |
model.add(LSTM(100, input_shape=(1, look_back), activation='relu')) | |
model.add(Dense(1)) | |
model.compile(loss='mean_squared_error', optimizer='adam',metrics = ['mse', 'mae']) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment