I have a tensor A = (10,1,4), I need to convert it to B = (10, 5, 4) provided that the second dimension is filled out from the first one in a circular way. That is, B[:,0,:] has values of A[1:5,:] and B[:,1,:] has values of A[2:6,:].
I tried repeat but all the items of B will be exactly as same as A
As you can see, the slice in A contains 16 elements while the slice in B contains 160 elements.
Could you post an example how B should be filled?
I think you might be able to use A.unfold, but of course the shape mismatch should be solved first.