# Operators¶

Function

Supported Device

Description

HPU

Performs element-wise addition and supports Broadcasting.

BasicCrop

CPU

Crops input tensor along width, height and depth.

BitwiseAnd

HPU

Computes the output by doing bitwise AND operation on input tensors.

BitwiseOr

HPU

Computes the output by doing bitwise OR operation on input tensors.

BitwiseXor

HPU

Computes the output by doing bitwise XOR operation on input tensors.

Brightness

HPU

Defines the brightness of the image.

Cast

HPU

Changes the data type of the input tensor.

Clamp

HPU

Clamps all elements in input into the range [lowerBound, upperBound].

CPU

Reader for SSD Coco dataset which produces outputs as images and metadata.

ColorSpaceConversion

HPU

Transforms the image from one color representation to another color representation.

Concat

HPU

Concatenates tensors along one dimension.

Constant

HPU

The output tensor is filled with the list from the input tensor. The length of the list is determined by the sizes of the input tensor.

Contrast

HPU

Defines the contrast of the image.

Crop

HPU

Crops input tensor with specified window dimensions and window position.

CropMirrorNorm

HPU

Performs fused cropping, mirroring, normalization, and type casting.

ExtCpuOp

CPU

Allows user to add existing CPU operators.

ExtHpuOp

HPU

Allows user to add existing TPC operators to media pipeline.

Flip

HPU

This operator flips selected dimensions (horizontal, vertical, depthwise).

GatherND

HPU

Gathers slices of input tensor into an output tensor of a specific rank.

GaussianBlur

HPU

Applies 1D Gaussian Blur on input tensor by applying grouped 1D convolution with input Gaussian kernel.

Hue

HPU

Modifies the hue of an image by specified degrees.

ImageDecoder

HPU

Decodes and resizes batch of images.

MediaConst

CPU

Generates constant data as per given shape and data type on every iteration.

CPU

Integrates external data reader with media pipe.

MediaFunc

CPU

Allows user to generate new tensor data on every iteration.

MemCpy

HPU

Copies data from the input tensor to the output tensor.

Mult

HPU

Performs element-wise multiplication and supports Broadcasting.

Neg

HPU

Resultant output tensor has the sign flipped for each element in input.

Normalize

HPU

Normalizes the input tensor by subtracting mean and dividing by standard deviation.

HPU

Pads a tensor with zeros or any numbers. .

RandomBiasedCrop

CPU

Performs random crop operation based on label data.

RandomBernoulli

HPU

Outputs a tensor with random numbers from a Bernoulli distribution.

RandomFlip

HPU

Flips images in a selected direction (horizontal or vertical) with a random predicate.

RandomNormal

HPU

Generates random numbers from a normal distribution.

CPU

CPU

Reads numpy data files and numpy label files either from given directory or file list and returns the batch of numpy images and labels.

ReduceMax

HPU

Computes the maximum of the input tensor’s elements along the provided dimension.

ReduceMin

HPU

Computes the minimum of the input tensor’s elements along the provided dimension.

Reshape

HPU

Returns a new tensor that has the same values as input tensor in the same order, except with a new shape given by size and tensorDim arguments.

Resize

HPU

Resizes an image by a scale factor using either bilinear, cubic, nearest neighbor or gaussian sampling.

Saturation

HPU

Modifies the saturation level of an image by a specified change factor.

Slice

HPU

Produces a slice of the input tensor along multiple axes.

Split

HPU

Splits a tensor into a list of tensors along the specified axis.

CPU

Takes the metadata output of Coco reader and performs operations such as crop, flip and encoding of bounding boxes.

Sub

HPU

Performs element-wise subtraction and supports Broadcasting.

Transpose

HPU

Produces a transposed tensor of the input tensor along multiple axes.