SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from keras.callbacks import ModelCheckpoint
  2. from keras.models import Sequential
  3. from keras.layers import Dense, Activation, Flatten
  4. from keras import optimizers
  5.  
  6. NN_model = Sequential()
  7.  
  8. # The Input Layer :
  9. NN_model.add(Dense(64, kernel_initializer='random_uniform',input_dim = X_train.shape[1], activation='relu'))
  10.  
  11. # The Hidden Layers :
  12. NN_model.add(Dense(128, kernel_initializer='random_uniform',activation='relu'))
  13. NN_model.add(Dense(128, kernel_initializer='random_uniform',activation='relu'))
  14. NN_model.add(Dense(128, kernel_initializer='random_uniform',activation='relu'))
  15.  
  16. # The Output Layer :
  17. NN_model.add(Dense(1, kernel_initializer='random_uniform',activation='linear'))
  18. adam = optimizers.Adam(lr=0.1, beta_1=0.9, beta_2=0.999, epsilon=None, decay=0.0, amsgrad=False)
  19. # Compile the network :
  20. NN_model.compile(loss='mean_squared_error', optimizer=sgd, metrics=['mean_squared_error'], )
  21. NN_model.summary()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top