What is the major difference between gather and index_select, other than that gather “gathers” values and index_select “selects” values? Is there any difference on the basis of underlying storage?
Also, if I want to assign a sub-tensor of a tensor (indexed using index_select) to a new value? How do I do that? For example,
 t = torch.Tensor([[1,2,5],[3,4,6]])
 t1 = torch.Tensor([[1,2,8],[3,4,9]])
 t2 = torch.index_select(t1, 1, torch.LongTensor([0, 2]))

I want to assign the [0, 2] indices along dimension 1 of t, to t2. I noticed that scatter_ does something like this, but I can’t seem to understand how it works. Any idea if that is indeed the way to go and if so, how does it work?