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

Prediction #16

Open
0xecute opened this issue Feb 14, 2018 · 2 comments
Open

Prediction #16

0xecute opened this issue Feb 14, 2018 · 2 comments

Comments

@0xecute
Copy link

0xecute commented Feb 14, 2018

Hi,
First, thanks for your code and tutorial, it is really interesting! I learned a lot.

Second, I have a question but I feel pretty stupid asking that since I got the impression I m missing the obvious :/
I did train my IA with all the stock_count (100 actually) and I would like to test how it will predict the price of GOOG.

So I did:

# python main.py --stock_symbol=GOOG --input_size=1 --lstm_size=128 --embed_size=8
{'batch_size': 64,
 'embed_size': 8,
 'init_epoch': 5,
 'init_learning_rate': 0.001,
 'input_size': 1,
 'keep_prob': 0.8,
 'learning_rate_decay': 0.99,
 'lstm_size': 128,
 'max_epoch': 50,
 'num_layers': 1,
 'num_steps': 30,
 'sample_size': 4,
 'stock_count': 100,
 'stock_symbol': 'GOOG',
 'train': False}
2018-02-14 14:47:55.716691: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2018-02-14 14:47:55.716715: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
inputs.shape: (?, 30, 1)
inputs_with_embed.shape: (?, 30, 9)
/home/mike/anaconda3/envs/IA/lib/python2.7/site-packages/tensorflow/python/ops/gradients_impl.py:95: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
---------
Variables: name (type shape) [size]
---------
embed_matrix:0 (float32_ref 100x8) [800, bytes: 3200]
dynamic_rnn/lstm_cell/kernel:0 (float32_ref 137x512) [70144, bytes: 280576]
dynamic_rnn/lstm_cell/bias:0 (float32_ref 512) [512, bytes: 2048]
w:0 (float32_ref 128x1) [128, bytes: 512]
b:0 (float32_ref 1) [1, bytes: 4]
Total size of variables: 71585
Total bytes of variables: 286340
 [*] Reading checkpoints...
 [*] Success to read stock_rnn_lstm128_step30_input1_embed8.model-218450

So it's working, but where can I get the prediction? It is writing no images and printing nothing.

Thanks again for you help, I have some idea of improvement for the project but I m stuck at this point :(

Best

@JeffXiao
Copy link

Did you try use train like this:
python main.py --stock_symbol=GOOG --train --input_size=1 --lstm_size=128 --max_epoch=50

then take a look at images folder?
It will be nice if we can improve the results in prediction.

@rishiswethan
Copy link

I don't see prediction in the images folder. I you tell me where to look?

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

3 participants