The index argument in index_select has to be a 1D tensor 18. I’m not sure exactly what you’re trying to do here, but it looks like indice is a 2 x 1 tensor (if I’m not mistaken). You can convert it over with indice.squeeze(1)