An runtime error about index_select

i’d like to acquire some value from a multi-dimension tensor at once using their index ,like:
indice=Variable(torch.cat(y1,x1).long())
output=torch_index_select(input,dim=0,index=indice)

but i got runtimerror like this:

runtimeerror: excepting vector of indices

In fact, the index needs a one-dimension vector. The indice you introduced may be not a one-dimension vector