I have a tensor of (x,y,z). I want to sample combination (n choose k) from x[start:stop], say x is 100, I want to get the combo (n choose k) of the first 10 (x[0:9], y, z), then move on to (x[10:19], y, z) and so on. If n = 10 and k = 2, this would be 45, but say I only want to keep the first L permutations. Is there an way to do this in pytorch?
20190411-update: I figured this out. I did some itertools operations, then converted to torch.