Hi @thecho7 ,
That is not quite what I am looking for. Here is an example via loop:
A=torch.arange(start=1, end=101)

def stack_sequence(sequence, window_size):
    thread_range=sequence.size(-1)-window_size+1
    out=torch.empty(0,window_size)
    for i in range(thread_range):
        out=torch.cat([out,sequence[i:i+window_size].unsqueeze(0)])

    return out

B = stack_sequence(A,10)
print(B)

What I am looking for is a more efficient solution, if one exists.