Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSTM_model.py and MLP_model.py doesnt print #4

Open
sword134 opened this issue Jul 23, 2019 · 1 comment
Open

LSTM_model.py and MLP_model.py doesnt print #4

sword134 opened this issue Jul 23, 2019 · 1 comment

Comments

@sword134
Copy link

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
Copy link
Author

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)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant