Skip to content

Instantly share code, notes, and snippets.

@lylayang
Last active March 9, 2020 05:15
Show Gist options
  • Save lylayang/c0a1e21646d66fbae8269e89256d8cec to your computer and use it in GitHub Desktop.
Save lylayang/c0a1e21646d66fbae8269e89256d8cec to your computer and use it in GitHub Desktop.
from keras.models import Sequential
from keras.layers import Dense
def model_dnn(look_back):
model=Sequential()
model.add(Dense(units=32, input_dim=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