简体   繁体   中英

how to use a LSTM model after training it?

I'm new to tensorflow and I'm using LSTM for Predicting stock prices to learn to use LSTM for predicting stock market prices. The question is: After training the model and saving it, how should I actually use it to predict the future of the market? I mean what should be the input for the predict method?

I will base my answer on your comment:

the data is a series of "closing price" of each day in the market. for example if it were a model for recognizing a cat, I would use a new cat image for the predict(). but for this kind of prediction, what should I use?

Generally speaking, when you train a model you should use the same type of data (type and context).

Given the example of the cat, it true that you will test it on images of cats, but it might not work good on tigers/pumas/etc.


So if your training data, stock market, came from a specific place (say Asia) so you should test your model on data collected from Asia.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM