Python wrappers
Public Python APIs implemented by this engine symbol.Split a tensor into a fixed number of equal pieces along an axis.
The size of a along axis must be divisible by num_splits.
Each output piece is wired with a SplitSliceBackward node that
scatters its gradient back into the correct slice of the input gradient
via insert_axis_slice.
See Also
split_at_op, chunk_op, unbind_op.
Parameters
aTensorImplPtrInput tensor.
num_splitsint64_tNumber of equal pieces. Must divide
a.shape[axis] exactly.axisintAxis to split along. Supports negative indexing.
Returns
vector<TensorImplPtr>num_splits tensors, each with shape identical to a except the axis dimension equals a.shape[axis] / num_splits.
Raises
ShapeMismatchIf
a.shape[axis] is not divisible by num_splits.