Solved by acobobby in post #2 
              
              
                For all of you that are interested, I think I found a solution, after many trials and errors: 
the trick is to set the torch.LongTensor used as index to have the same 0-th dimension value for each dimension of the original tensor. 
The code is very simple: 
# select first and second row for each bat…