HI there! I’ve created a dataset in which 5 trajectories taken at the same scenario are concatenated in this way:

1 trajectory has N of positions measured (this is the number of rows) & a fixed number of columns (shared between trajectories) that represent the data of each position of the trajectory. So each trajectory has shape (N, n_columns)
So the dataset has shape: (N*number_trajectories, n_columns). My problem is that I’m trying to train a LSTM with different sequence length, being the sequence length how many positions does the LSTM see for predicting the output.
However I have a problem separating the trayectories for training: some of the final positions of one trajectory are fed with the first positions of the new trayectory because of how I feed the network with the sequence length.
A comparison just in case I’m not explaining: it’s like if my dataset is compose by 7 reviews expressed as one large string, and I mix the last words of my first review with the first words of my second review that have nothing to do one with another. So I know that I can separate this by spliting the reviews by new line, creating a vector in which each row is a review.

However I dont know how to do this with my vector data. Any help?