Say I have a 3-dim tensor (A) and 2 long tensor (B and C, with only 1 dimension) to be used for indexing. I want to index all of the first dimension and the last 2 dimension with B and C.
In PyTorch, I can index tensor A with A[:, B, C]:
>>> A
tensor([[[ 0,  1,  2,  3],
         [ 4,  5,  6,  7],
         [ 8,  9, 10, 11]],

        [[12, 13, 14, 15],
         [16, 17, 18, 19],
         [20, 21, 22, 23]]])
>>> B
tensor([0, 2])
>>> C
tensor([3, 1])
>>> A[:, B, C]
tensor([[ 3,  9],
        [15, 21]])

How can I do the equivalent in libtorch? I know I can use A.index({B, C, D}); if I want to index all dimensions with B, C, D, but how can I filter only the last two dimension with B and C?