LSTM - How to set sequence length?

I’m a little confused on how to set the maximum lookback range for LSTM. I have a data set of N samples with M features - how do I set a window size of 5?

1 Like

@Ericxgao Were you able to figure this out? I have a similar doubt.

after every 5 iterations, you can detach your hidden layer like: hidden = hidden.detach()

1 Like