Hi,
I am implementing an LSTMCell in order to predict a value (float) in a time series setting. In order to update the weights of the cell it makes sense to calculate the gradients of the weights over all previous states of the cell. However, as the time series are long this substantially reduces calculation speed. By running .detach() before every single input/output it is possible to update my weights in a timely fashion. However, a lot of information gets lost and training would work better if gradients on the weights from previous updates of the LSTM were taken into account as well.  I am wondering whether it is possible to detach part of the history of calculations with respect to the weights, making it therefore faster to run .backward(). Specifically, is it possible to update the weights of the model taking only a window of the 10 previous time steps into account.
Thank you in advance.