a = torch.Tensor([[1,2,3],[5,6,7]]) a.is_contiguous() # True a.transpose(0,1).is_contiguous() # False a.transpose(0,1).contiguous().is_contiguous() # True
torch Tensor.contiguous()
Creator
Creator
Seonglae ChoCreated
Created
2025 Oct 29 11:30Editor
Editor
Seonglae ChoEdited
Edited
2025 Oct 29 11:33Refs
Refs
