The purpose of unbind

What is the purpose of torch.unbind? Can I not just iterate over the tensor itself indexing the the dimension I want to slice? I don’t really understand why it exists.


Yes unbind is similar to creating a list of slices of the Tensor.
Unbind is going to be slightly faster than creating this list and doing the slicing by hand.