Will use two copies: when creating the tensor (as you are not using from_numpy) and the data transfer to the GPU
Only the transfer
Will create the tensor on the device directly, so I would use this approach.

Of course you won’t notice a significant difference given the current shapes, but I assume that this code snippet is only to show the different approaches.