Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----------------------------------------------------------------------------------
- print("nX_train size: {}".format(X_train.shape)) #X_train size: (40, 1, 1440)
- print("X_test size: {}".format(X_test.shape)) #X_test size: (40, 1, 1440)
- #-----------------------------------------------------------------------------------
- model_RNN = Sequential()
- model_RNN.add(SimpleRNN(units=1440, input_shape=(X_train.shape[1], X_train.shape[2])))
- model_RNN.add(Dense(960))
- #model_RNN.add(BatchNormalization())
- #model_RNN.add(Activation('sigmoid'))
- #model_RNN.add(Activation('softmax'))
- #model_RNN.add(Activation('tanh'))
- model_RNN.compile(loss='mean_squared_error', optimizer='adam')
- hist=model_RNN.fit(X_train, Y_train, epochs =50, batch_size =20,validation_data=(X_test,Y_test),verbose=1)
- y_pred=model_RNN.predict(X_train)
- train_RNN= pd.DataFrame.from_records(y_pred)
- y_pred=model_RNN.predict(X_test)
- test_RNN= pd.DataFrame.from_records(y_pred)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement