Split a tensor along its third (depth) axis.
NumPy-style depth-wise split: cuts the input into pieces along axis 2.
Mirrors vsplit (axis 0) and hsplit (axis 1).
Parameters
inputTensorInput tensor with at least 3 dimensions.
indices_or_sectionsint | Sequence[int]int: number of equal-sized splits along axis 2; it must divide the axis length.Sequence[int]: cut indices along axis 2.
Returns
list[Tensor]Sub-tensors whose concatenation along axis 2 reproduces input.
Raises
lucid._C.engine.InvalidArgumentIf
input.ndim < 3, or a section count does not divide axis 2.Notes
For a tensor of shape split into k pieces
along axis 2, each piece has shape .
Examples
>>> import lucid
>>> x = lucid.arange(24).reshape(2, 3, 4)
>>> [s.shape for s in lucid.dsplit(x, 2)]
[(2, 3, 2), (2, 3, 2)]