torch.hsplit
- torch.hsplit(input, indices_or_sections) → List of Tensors
Splits
input, a tensor with one or more dimensions, into multiple tensors horizontally according toindices_or_sections. Each split is a view ofinput.If is one dimensional this is equivalent to calling torch.tensor_split(input, indices_or_sections, dim=0) (the split dimension is zero), and if has two or more dimensions it’s equivalent to calling torch.tensor_split(input, indices_or_sections, dim=1) (the split dimension is 1), except that if is an integer it must evenly divide the split dimension or a runtime error will be thrown.