Solved by albanD in post #5 
              
              
                I mean the function without the _. Which won’t modify the input inplace but return a new Tensor containing the result. See the doc here.