Index assignment in c++

I just tested. x.index_select(1, ind).copy_(x2) does not work. I think x.index_select(1, ind) created a temporary tensor.

1 Like