Python wrappers
Public Python APIs implemented by this engine symbols.Repeat the contents of a tensor along a single axis.
Produces an output whose axis dimension is repeats times larger
than the input's; every other dimension is unchanged. Each element along
axis is replicated as a contiguous block of repeats copies in the
output (this is interleaved repetition, distinct from tile_op).
Math
where repeats and is the index along axis.
Shape
out.shape[axis] = a.shape[axis] * repeats; all other dims unchanged.
See Also
tile_op — multi-axis tiling; different element ordering.
Parameters
aTensorImplPtrInput tensor.
repeatsint64_tNumber of times to repeat along
axis. Must be > 0.axisintAxis along which to repeat. Supports negative indexing.
Returns
TensorImplPtrTensor of shape a.shape with the axis dimension scaled by repeats.
Notes
Backward sums the repeated gradient blocks back into the original shape via
Dispatcher::repeat_backward. Schema name "repeat",
AmpPolicy::KeepInput.