This project started from idea to explore alternatives for current LSTM and GRU implementations to predict data
Structure- Tensorflow model - was created around of 2 TCN and 1 Dense layers.
- IE model - available only for CPU device
- data - daily data of Bitcoin prices
Main data used to create TF model was Bitcoin daily price and CVS file was generated from Yahoo Finance
Second step after loading price data was to parse into train/test sets (60/40) and split train sets in multiple windows
Model used to parse data was created with 2 TCN layers because performs better than LSTM/GRU architectures and for low memory requirements.
TCN implementation provided by Philippe Rémy on github provided a fast and optimal API for this project
Last 2 steps for current model are compilation and training. For compilation was used Adam optimizer and for Loss mae.
ie_modelOption to convert TF model to IE with OpenVino toolkit is simple and mo_tf.py script was used to generate FP16 and FP32 files :
[ SUCCESS ] Generated IR version 10 model.
[ SUCCESS ] XML file: /opt/ie_model/saved_model/fp32/saved_model.xml
[ SUCCESS ] BIN file: /opt/ie_model/saved_model/fp32/saved_model.bin
[ SUCCESS ] Total execution time: 68.63 seconds.
[ SUCCESS ] Memory consumed: 481 MB.
Generated IE model can be tested only for CPU device.
After running ie model on cpu device, script will check on Yahoo Finance if are any updates for current data and then will predict and plot final results :
===== Load model to device ====
Input Shape: (1, 5, 32)
===== Input and Predicted Values ====
[Input] Values : Open 11057.01 High 11467.82 Low 11057.01 Close 11467.82 Adj Close 11467.82 Volume 24004315136
[Output] Predicted price for tomorrow is 11472.96 $
Comments