IntroNeuralNetworks icon indicating copy to clipboard operation
IntroNeuralNetworks copied to clipboard

LSTM_model.py and MLP_model.py doesnt print

Open sword134 opened this issue 6 years ago • 1 comments

Hello! I am trying to figure out why neither models print any output. I ran get_prices.py and it created the correct csv file with data. I then ran preprocessing.py and again with no problems. However when I run LSTM_model.py or MLP_model-py it epochs the data and so on and finishes with no error messages, however it doesnt print anything either.

sword134 avatar Jul 23 '19 08:07 sword134

I tried changing the bottom line of code in LSTM_model.py to this

data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-12")
stock = data["Adj Close"]
X_predict = np.array(stock).reshape((1, 10, 1)) / 200

#print(model.predict(X_predict)*200)
predicter = model.predict(X_predict)*200
print(predicter)

I now get the following error "Traceback (most recent call last): File "d:\Tradingsystems\RNN\IntroNeuralNetworks-master\LSTM_model.py", line 37, in X_predict = np.array(stock).reshape((1, 10)) / 200 ValueError: cannot reshape array of size 268 into shape (1,10)"

sword134 avatar Jul 23 '19 08:07 sword134