Chunk
torch_chunk(self, chunks, dim = 1L)
self
: (Tensor) the tensor to splitchunks
: (int) number of chunks to returndim
: (int) dimension along which to split the tensorSplits a tensor into a specific number of chunks. Each chunk is a view of the input tensor.
Last chunk will be smaller if the tensor size along the given dimension dim
is not divisible by chunks
.
Useful links