.contiguous() will copy here. It does if the tensor isn’t contiguous, and this is the case here, as contiguous is roughly defined as “lowest stride = 1, higher strides = previous_size * previous_stride”.
Best regards
Thomas