I have a PyTorch tensor b with the shape: torch.Size([10, 10, 51]). I want to select one element between the 10 possible elements in the dimension d=1 (middle one) using a numpy array: a = np.array([0,1,2,3,4,5,6,7,8,9]). this is just a random example.
I wanted to do:
b[:,a,:] but that isn't working
(10, 51)?btensor and what tensor you're expecting to get out.