In python torch, it seems copy.deepcopy method is generally used to create deep-copies of torch tensors instead of creating views of existing tensors.
Meanwhile,
as far as I understood, the torch.tensor.contiguous() method turns a non-contiguous tensor into a contiguous tensor, or a view into a deeply copied tensor.
Then, do the two code lines below work equivalently if I want to deepcopy src_tensor into dst_tensor?
org_tensor = torch.rand(4)
src_tensor = org_tensor
dst_tensor = copy.deepcopy(src_tensor) # 1
dst_tensor = src_tensor.contiguous() # 2
If the two work equivalent, which method is better in deepcopying tensors?