SHARE
TWEET

Untitled

a guest Jun 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #-----------------------------------------------------------------------------------
  2. print("nX_train size: {}".format(X_train.shape))  #X_train size: (40, 1, 1440)
  3. print("X_test  size: {}".format(X_test.shape))     #X_test  size: (40, 1, 1440)
  4. #-----------------------------------------------------------------------------------
  5. model_RNN = Sequential()
  6. model_RNN.add(SimpleRNN(units=1440, input_shape=(X_train.shape[1], X_train.shape[2])))
  7. model_RNN.add(Dense(960))
  8. #model_RNN.add(BatchNormalization())
  9. #model_RNN.add(Activation('sigmoid'))
  10. #model_RNN.add(Activation('softmax'))
  11. #model_RNN.add(Activation('tanh'))
  12. model_RNN.compile(loss='mean_squared_error', optimizer='adam')
  13. hist=model_RNN.fit(X_train, Y_train, epochs =50, batch_size =20,validation_data=(X_test,Y_test),verbose=1)
  14.  
  15. y_pred=model_RNN.predict(X_train)
  16. train_RNN= pd.DataFrame.from_records(y_pred)
  17.  
  18. y_pred=model_RNN.predict(X_test)
  19. test_RNN= pd.DataFrame.from_records(y_pred)
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