torch.split
- torch.split(tensor, split_size_or_sections, dim=0)
Splits the tensor into chunks. Each chunk is a view of the original tensor.
If
split_size_or_sectionsis an integer type, thentensorwill be split into equally sized chunks (if possible). Last chunk will be smaller if the tensor size along the given dimension is not divisible by .