If you do p_target.data = p_source.data then the data doesn’t get copied. Python just copies the memory address of the tensor so that p_target.data and p_source.data reference the same storage location.