Solved by MartinZhang in post #3 
              
              
                I found it，at::Dimanme dim  is equivalent to int 
In this way： 
torch::Tensor data;

torch::Tensot index;

torch::result = at::index_select(data, 0, index);

So funny