hy,
i have tow  tensors
ind with size = (2, 261234, 1)
g = with size = (2, 783456, 1)
i wante to gather tem with the gather function, and put the result in g
whene i write g = g.gather(1, ind) the folowing error apeer:
RuntimeError: Expected object of type torch.LongTensor but found type torch.FloatTensor for argument #3 ‘index’
whene i try to change the type of ind by ind.type(tornch.long), i got  this error;
RuntimeError: Invalid index in gather at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/TH/generic/THTensorMath.c:600
any one can help me?