How to select values using 2 index tensor from a 3D tensor?

In that case, you can just index t:

out = t[x[:, None], y]
print(out)
> tensor([[  1,   3,   5,   7,   9,  11,  13,  15],
          [ 33,  35,  37,  39,  41,  43,  45,  47],
          [ 65,  67,  69,  71,  73,  75,  77,  79],
          [ 97,  99, 101, 103, 105, 107, 109, 111],
          [129, 131, 133, 135, 137, 139, 141, 143],
          [161, 163, 165, 167, 169, 171, 173, 175],
          [193, 195, 197, 199, 201, 203, 205, 207],
          [225, 227, 229, 231, 233, 235, 237, 239]])

The last rows will be different, since in your example you’ve indexed row15 and row13.