Skip to main content

TensorMath.maxInSlideWindow

Function

If we consider the tensor as a 3D array, this function finds the indexes of the maximum element in each subarray of size window.

  • 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.

maxInSlideWindow(tensor, tensorShape, window, output): void

If we consider the tensor as a 3D array, this function finds the indexes of the maximum element in each subarray of size window.

tensor - Float32Array of size (width * height * depth). 3D array of input data

tensorShape - Should be {width, height, depth}

window - Size of each subarray, in each of which will be found the index of the max element

output - Float32Array of size (width * height * depth). The index of the max value will be written into this array for each subarray.

Parameters

ParameterType
tensorFloat32Array
tensorShapevec3
windowvec3
outputUint32Array

Returns

void