Back

Loading Keras model weights into the backtester

Hi,

First of all I just want to say what an awesome product!

I was wondering how I can upload pretrained keras weights to the backtester so that I can instantiate my model with weights I have found locally on my own computer.

Best regards,

Erlend

Update Backtest







0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Unfortunately, QuantConnect currently does not support HDF5 files which the keras weights are formatted in once saved. It is, however, on our to-do list:

https://github.com/QuantConnect/Lean/issues/1040
0

Ok, thanks for your prompt reply. How about the Tensorflow saving/loading functionlity?

0

Hi, it's great to hear that QC will work with Keras models. 

Is there any updates on this topic (loading pre-trained models to QC)?

0

Erlend Løken and Raul Castellanos, the saving/loading pre-trained models' functionality is not a high priority feature, but we will look into it as soon as possible.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Any update on this feature? 

I'm greatful for the keras implementation, but since there is a five minute timeout on initialization AND no way to upload model weights, it becomes quite difficult to utilize this part of the API. I would prefer not to waste your server resources training models

As for the five minute timeout, I see that going the setwarmup route would get around this, but the rollingwindow class does not return a dataframe like the history class does; so there is again a lot of resources wasted copying the stream to a dataframe/array

0

We shipped train to increase time allocation for training models:

https://www.quantconnect.com/docs/algorithm-reference/machine-learning



Object store coming soon!
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Thank you for correcting my igonance :)

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed