I don’t quite understand the desired output shape given the input tensor and index.
If tensor is defined as:
B, N, C = 5, 4, 3
x = torch.arange(B*N*C).view(B, N, C)
print(x)

what would be the desired output?
If you want to create an output of [1, N, 3] you would index x in dim0 with a single value.