Then this error shouldn’t be raised as seen in this code snippet:
Delta = torch.randn(10, 10, 10)

i = 1
out = Delta[:, i:i+1, :] # works

i = torch.tensor([0, 1])
out = Delta[:, i:i+1, :] # your error
> TypeError: only integer tensors of a single element can be converted to an index

Feel free to post an executable code snippet to reproduce this issue, so that we could have a look.