Загрузка
Attempts to split a tensor into the specified number of chunks. Each chunk is a view of the input tensor.
If the tensor size along the given dimension dim is divisible by chunks,
all returned chunks will be the same size.
If the tensor size along the given dimension dim is not divisible by chunks,
all returned chunks will be the same size, except the last one.
If such division is not possible, this function may return fewer
than the specified number of chunks.
>>> torch.arange(11).chunk(6)
(tensor([0, 1]),
tensor([2, 3]),
tensor([4, 5]),
tensor([6, 7]),
tensor([8, 9]),
tensor([10]))
>>> torch.arange(12).chunk(6)
(tensor([0, 1]),
tensor([2, 3]),
tensor([4, 5]),
tensor([6, 7]),
tensor([8, 9]),