For below code, How would I access the value of “x” for the index mentioned in “y”?
Output should be [[1,9,17],[4,12,20]].
x shape is "torch.Size([3,1,8])  and y shape is "torch.Size([2, 2]).
import torch
x= torch.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.]]])


y=torch.tensor([[0,1],[0,4]])