TensorMath.sum
FunctionCalculate the sum of the inTensor elements and store result in the outTensor.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
sum(
inTensor,inShape,axis,outTensor):void
Calculate the sum of the inTensor elements and store result in the outTensor.
Axis specifies axis along which a sum is performed., e.g:
axis(0, 0, 0): the sum will be performed on the whole tensor
axis(0, 0, 1): the sum will be performed along the z axis. outTensor will store inShape.z values
axis(1, 1, 0): the sum will be performed along x and y axes. outTensor will store
inShape.x * inShape.y values, where outTensor[y][x] is the sum of all inTensor[0..inShape.z-1][y][x] values
Parameters
Returns
void