Question about terminology used in LSTM inputs - seq_length vs context_size for sliding window approach
I have time series of a sequence of n vectors that I need to feed to a LSTM with a sliding window approach. 

In different resources that I read online, seq_length is often referred to as the window length [or the number of LSTM cells] and context_size is defined as the input size to LSTM at a timestep. (for eg. one input vector at a time step).

At any given point of time t, I want to pass points x_{t-m}, …, x_{t-1},…,x_{t} to LSTM followed by a dense layer and predict a categorical target attribute at every tilmestep. 

If I want to follow the sliding window approach, do I need to explicitly split input data into windows of size m ? 

For instance: 

[x_{t-m}, …, x_{t-1},…,x_{t}], [x_{t-m+1}, …, x_{t},…,x_{t+1}], [x_{t-m+2}, …, x_{t+1}, x_{t+2}] etc.

Or, can I split the input data into non-overlapping chunks [x_{t-m}, …, x_{t-1},…,x_{t}], [x_{t+1}, …, x_{t+m-1},x_{t+m}] etc. and instead resize the context_size ?

     embeds = embeds.unfold(1, context_size, 1)  # Keeping the step size to be 1
     embeds = embeds.view(embeds.size(0), embeds.size(1), -1)


Is there a better way to implement sliding window approach for timeseries data ?

LSTM by default recurses on data, in that the prediction at time t will depend on all of the past(depending on memory). In this case it seems like you want input at time t to depend on m+1 instances into the past. You do not need a recurrent net if so, you can simple use linear and feed in the sliding window at each instant. However, if you're using a recurrent net, you don't need to pass the same inputs again and again. 
