Skip to main content

TensorMath.repeat

Function

Duplicates inTensor elements and store result in the outTensor.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

repeat(inTensor, inShape, axis, outTensor): void

Duplicates inTensor elements and store result in the outTensor.

Axis specifies the number of repeats along the axis e.g:

axis(1, 1, 1): outTensor will be the same as inTensor

axis(2, 1, 2): inTesnor = [1 2 3 | 4 5 6], inShape = [3 2 1] =>

outTensor = [[1 1 2 2 3 3 | 4 4 5 5 6 6] [1 1 2 2 3 3 | 4 4 5 5 6 6]] outShape = [6 2 2]

Parameters

ParameterType
inTensorFloat32Array
inShapevec3
axisvec3
outTensorFloat32Array

Returns

void