Solved by glaringlee in post #8 
              
              
                @almeetb 
For your example above. 
If you translate that into c++ apis, it should call index(). 
If you just do it from python, it won’t dispatch any of the indexing apis you’ve tried including index(), what it actually called is 
‘https://github.com/pytorch/pytorch/blob/3d46e02ea1f8951bcef167c33bad…