Hi Gang!
I am building my first ML model in the research environment. It's an LSTM model using PyTorch. My goal is to create a model that I can feed my custom indicator values into as features.
I am asking for the community's help because I am running into some errors. I have no background in data or ML, so I am praying that someone much smarter than me can help me understand what's wrong.
Ignore main.py and the backtest! Just generic ones to allow attaching.
~~~~~~~~~~~~~~~~~~~~
The actual errors are:
[7] “input_size = X_train.shape[2]” produces“IndexError: tuple index out of range"

[8] “outputs = model(inputs)" produces“RuntimeError: For unbatched 2-D input, hx and cx should also be 2-D but got (3-D, 3-D) tensors”

~~~~~~~~~~~~~~~~~~~~
From what I've picked up, there are issues with “reshaping” and “batching," which unfortunately aren't terms I'm familiar with (my brain starts smoking whenever I see an .iloc or .flatten).
Thank y'all in advance!
Eric Kao
I have resolve the issues by rewriting the code to as follows:
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!