For example, if I want to implement a smoothl1loss output per instance loss, I need to check every elements whether they are in [-1, 1]. Now I only know I can use torch.index_select,  then cat two part together but in this way I can’t restore them to one tensor as the same order of input, Is there any way to do this ? Or I must implement this using cffi?