Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement