Skip to content
fn

split_at_op

→vector<TensorImplPtr>
int split_at_op(const int & a, int indices, int axis)

Split a tensor at user-specified indices along an axis.

Produces indices.size() + 1 pieces whose sizes along axis are the consecutive differences between 0, the sorted indices, and a.shape[axis]. Each piece carries its own SplitSliceBackward node.

See Also

split_op.

Parameters

aTensorImplPtr
Input tensor.
indicesvector<int64_t>
Strictly increasing split positions in the range [0, a.shape[axis]].
axisint
Axis to split along. Supports negative indexing.

Returns

vector<TensorImplPtr>

indices.size() + 1 tensors whose axis dimensions partition a.shape[axis].