An out of bounds index error when using Pytorch gather
I have Two Tensors

I am trying to gather one from each row with the column being specified by these indices. So I am trying to get:

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1]


This is my code for this:

self.manDistMat.gather(1, state.unsqueeze(-1)))
self.manDistMat


being the 16x16 matrix and state.unsqueeze(-1) being the other matrix.

When I try this I get this error.


  RuntimeError: index 578437695752307201 is out of bounds for dimension 1 with size 16


What am I doing wrong?

I encountered the similar problem. It appears to be a bug in pytorch.
