Last active
March 28, 2020 19:51
-
-
Save lylayang/9951aa7a519ab4c3d429eb72eb9cce48 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, SimpleRNN | |
from keras.callbacks import EarlyStopping | |
def model_rnn(look_back): | |
model=Sequential() | |
model.add(SimpleRNN(units=32, input_shape=(1,look_back), activation="relu")) | |
model.add(Dense(8, 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