Solved by albanD in post #2 
              
              
                Hi, 
What .clone() does is allocate brand new memory and copy the content of the Tensor into it. It always creates a new contiguous Tensor as output. 
The thing with expand is that it does not actually allocate new memory but play with stride. Unfortunately, not all functions support non-standard st…