Skip to content
fn

chunk_op

→vector<TensorImplPtr>
int chunk_op(const int & a, int chunks, int axis)

Python wrappers

Public Python APIs implemented by this engine symbol.

Split a tensor into a fixed number of equal chunks along an axis.

Alias for split_op with num_splits = chunks. Provided for API symmetry with reference framework's chunk.

See Also

split_op.

Parameters

aTensorImplPtr
Input tensor.
chunksint64_t
Number of chunks; must divide a.shape[axis] exactly.
axisint
Axis to chunk along.

Returns

vector<TensorImplPtr>

chunks equal-sized tensors.