stock-market-prediction
stock-market-prediction copied to clipboard
I'm having some problems, can you help me?
Hello, now I want to use CNN+LSTM to achieve stock prediction. My LSTM is completely handwritten, so I encountered a problem. That is, I designed a three-layer CNN. The dimensions of the CNN input are (1, 1, N) (N represents uncertainty). The CNN also has a flaten at the end, and finally we get (1, M). After that, I take this and enter the LSTM layer. Since M is uncertain, I want to input it into the LSTM layer one by one. In each prediction, LSTM backpropagation needs to be performed. Do I use the predicted value of LSTM and the value output by the CNN input to the LSTM layer to calculate the loss? Also, since the LSTM layer is handwritten, the backpropagation is also handwritten. So, can I still use pytorch’s automatic derivation mechanism for CNN backpropagation?