Range of a tensor in C++

see Subtensor add and division in libtorch