Tensor reshaping without corrupting data

I’ve noticed that different methods of reshaping a tensor (.reshape(), .view(), .permute()) seem to sometimes somehow corrupt (somehow change its order) data inside tensor, but i was not able to pinpoint when they do so, because reshaping it back restores original

Can someone explain to me what is a preferable method, and in what case i should use each method, please?

1 Like
1 Like