Hey so here’s my actual use case, I’m using a pretrained LSTM based sentence encoder (InferSent) that consumes a group of sentences, i.e. cliques. So a batch looks like [ L, N, D] where L is the sentence length, N is the number of sentences, and D is the embedding dimension of a word in the sentence. This batch is then fed into the LSTM encoder which outputs [N, D2] where D2 is the sentence embedding dimension. Now the exact challenge is that each row is 1 sentence but I want to work with a group of consecutive sentences, cliques,. That is to say for a clique size of 3 rows [0:2] should be grouped together with the ordering preserved. So I want to somehow reshape this batch into [N / 3 , 3 , D2] and feed it into some other downstream model and still be end to end differentiable. Torch.split() returns a list which would break the computation graph. I’m currently using .view() to get around this problem but im not sure if thats the best practice here.