AMD Neural Network Extension API

AMD Neural Network Extension API#

MIVisionX: Extension: AMD Neural Network Extension API
Extension: AMD Neural Network Extension API

AMD OpenVX Neural Network Nodes Extension to enhance Khronos Convolutional Network Nodes Extension. More...

Macros

#define VX_NN_ACTIVATION_LEAKY_RELU   (VX_ENUM_BASE(VX_ID_AMD, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x9)
 The Neural Network activation functions vx_nn_activation_function_e extension.
 

Functions

VX_API_ENTRY vx_node VX_API_CALL vxBatchNormalizationLayer (vx_graph graph, vx_tensor input, vx_tensor mean, vx_tensor variance, vx_tensor scale, vx_tensor bias, vx_float32 eps, vx_tensor output)
 [Graph] Creates a Batch Normalization Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxScaleLayer (vx_graph graph, vx_tensor input, vx_tensor scale, vx_tensor bias, vx_tensor output)
 [Graph] Creates a Scale Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxArgmaxLayer (vx_graph graph, vx_tensor input, vx_reference output)
 [Graph] Creates a Argmax Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxConvertImageToTensorNode (vx_graph graph, vx_image input, vx_tensor output, vx_float32 a, vx_float32 b, vx_bool reverse_channel_order)
 [Graph] Creates a Image to Tensor Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxConvertTensorToImageNode (vx_graph graph, vx_tensor input, vx_image output, vx_float32 a, vx_float32 b, vx_bool reverse_channel_order)
 [Graph] Creates a Tensor to Image Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxConcatLayer (vx_graph graph, vx_tensor output, vx_tensor input1, vx_tensor input2, vx_tensor input3, vx_tensor input4, vx_tensor input5, vx_tensor input6, vx_tensor input7, vx_tensor input8, vx_int32 axis)
 [Graph] Creates a Concat Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxSliceLayer (vx_graph graph, vx_tensor input, vx_tensor output1, vx_tensor output2, vx_tensor output3, vx_tensor output4, vx_tensor output5, vx_tensor output6, vx_tensor output7, vx_tensor output8)
 [Graph] Creates a Slice Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxUpsampleNearestLayer (vx_graph graph, vx_tensor input, vx_tensor output)
 [Graph] Creates a Convolutional Network Upsampling Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxReshapeLayer (vx_graph graph, vx_tensor input, vx_tensor output)
 [Graph] Creates a Convolutional Network Reshape Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxPermuteLayer (vx_graph graph, vx_tensor input, vx_array order, vx_tensor output)
 [Graph] Creates a Permute Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxPriorBoxLayer (vx_graph graph, vx_tensor input_1, vx_tensor input_2, vx_float32 minSize, vx_array aspect_ratio, vx_int32 flip, vx_int32 clip, vx_float32 offset, vx_tensor output, vx_array variance, vx_float32 maxSize)
 [Graph] Creates a Prior Box Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxCropLayer (vx_graph graph, vx_tensor input, vx_tensor ref, vx_tensor output, vx_scalar axis, vx_scalar offset1, vx_scalar offset2, vx_scalar offset3, vx_scalar offset4)
 [Graph] Creates a Crop Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxCropAndResizeLayer (vx_graph graph, vx_tensor input, vx_tensor output, vx_scalar x_coord, vx_scalar y_coord, vx_scalar width, vx_scalar height, vx_scalar scaleFactor, vx_scalar mode)
 [Graph] Creates a Crop_And_Resize Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTensorMinNode (vx_graph graph, vx_tensor input, vx_tensor input2, vx_tensor output)
 [Graph] Creates a Tensor_Min Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTensorMaxNode (vx_graph graph, vx_tensor input, vx_tensor input2, vx_tensor output)
 [Graph] Creates a Tensor_Max Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxDetectionOutputLayer (vx_graph graph, vx_tensor input1, vx_tensor input2, vx_tensor input3, vx_int32 num_classes, vx_int32 share_location, vx_int32 background_label_id, vx_float32 nms_threshold, vx_int32 code_type, vx_int32 keep_top_k, vx_int32 variance_encoded_in_target, vx_tensor output)
 [Graph] Creates a Detection Output Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxCastLayer (vx_graph graph, vx_tensor input, vx_int32 output_data_type, vx_tensor output)
 [Graph] Creates a Cast Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTensorExpNode (vx_graph graph, vx_tensor input, vx_tensor output)
 [Graph] Creates a Tensor_Exp Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTensorLogNode (vx_graph graph, vx_tensor input, vx_tensor output)
 [Graph] Creates a Tensor_Log Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxNMSLayer (vx_graph graph, vx_tensor boxes, vx_tensor scores, vx_int32 center_point_box, vx_tensor output, vx_tensor max_output_boxes_per_class, vx_tensor iou_threshold, vx_tensor score_threshold)
 [Graph] Creates a Non Max Suppression Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxGatherLayer (vx_graph graph, vx_tensor input, vx_tensor indices, vx_tensor output, vx_int32 axis)
 [Graph] Creates a Gather Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTopKLayer (vx_graph graph, vx_tensor x_tensor, vx_tensor k_tensor, vx_int32 axis, vx_int32 largest, vx_int32 sorted, vx_tensor values, vx_tensor indices)
 [Graph] Creates a TopK Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxReduceMinLayer (vx_graph graph, vx_tensor data, vx_array axes, vx_int32 keepdims, vx_tensor reduced)
 [Graph] Creates a Reduce Min Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTileLayer (vx_graph graph, vx_tensor input, vx_tensor repeats, vx_tensor output)
 [Graph] Creates a Tile Layer Node. More...
 
VX_API_ENTRY vx_node VX_API_CALL vxTensorCompareNode (vx_graph graph, vx_tensor input, vx_tensor input2, vx_tensor output)
 [Graph] Creates a Tensor Compare Node. More...
 

Detailed Description

AMD OpenVX Neural Network Nodes Extension to enhance Khronos Convolutional Network Nodes Extension.

Function Documentation

◆ vxArgmaxLayer()

VX_API_ENTRY vx_node VX_API_CALL vxArgmaxLayer ( vx_graph  graph,
vx_tensor  input,
vx_reference  output 
)

[Graph] Creates a Argmax Layer Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxBatchNormalizationLayer()

VX_API_ENTRY vx_node VX_API_CALL vxBatchNormalizationLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  mean,
vx_tensor  variance,
vx_tensor  scale,
vx_tensor  bias,
vx_float32  eps,
vx_tensor  output 
)

[Graph] Creates a Batch Normalization Layer Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[in]meanThe mean tensor data.
[in]varianceThe variance tensor data.
[in]scaleThe scale tensor data.
[in]biasThe bias tensor data.
[in]epsThe eps vx_float32 data.
[out]outputThe output tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxCastLayer()

VX_API_ENTRY vx_node VX_API_CALL vxCastLayer ( vx_graph  graph,
vx_tensor  input,
vx_int32  output_data_type,
vx_tensor  output 
)

[Graph] Creates a Cast Layer Node.

Converts all the elements of the input tensor to the data type specified by input_2 of the node. This function supports 2D or 4D tensors as input and output.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data. Can be VX_TYPE_FLOAT32, VX_TYPE_INT32, VX_TYPE_INT64.
[in]output_data_typeThe required output tensor data type. Integer value between 0-13.
[out]outputThe output tensor data. Output will have the same number of dimensions as input. Output tensor data type will be that specified by 'to'.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxConcatLayer()

VX_API_ENTRY vx_node VX_API_CALL vxConcatLayer ( vx_graph  graph,
vx_tensor  output,
vx_tensor  input1,
vx_tensor  input2,
vx_tensor  input3,
vx_tensor  input4,
vx_tensor  input5,
vx_tensor  input6,
vx_tensor  input7,
vx_tensor  input8,
vx_int32  axis 
)

[Graph] Creates a Concat Layer Node.

Parameters
[in]graphThe handle to the graph.
[out]outputThe output tensor data.
[in]input1The input 1 tensor data.
[in]input2The input 2 tensor data.
[in]input3The input 3 tensor data.
[in]input4The input 4 tensor data.
[in]input5The input 5 tensor data.
[in]input6The input 6 tensor data.
[in]input7The input 7 tensor data.
[in]input8The input 8 tensor data.
[in]axisThe axis vx_int32 data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxConvertImageToTensorNode()

VX_API_ENTRY vx_node VX_API_CALL vxConvertImageToTensorNode ( vx_graph  graph,
vx_image  input,
vx_tensor  output,
vx_float32  a,
vx_float32  b,
vx_bool  reverse_channel_order 
)

[Graph] Creates a Image to Tensor Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data.
[in]aThe a vx_float32 data.
[in]bThe b vx_float32 data.
[in]reverse_channel_orderThe reverse channel order vx_bool data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxConvertTensorToImageNode()

VX_API_ENTRY vx_node VX_API_CALL vxConvertTensorToImageNode ( vx_graph  graph,
vx_tensor  input,
vx_image  output,
vx_float32  a,
vx_float32  b,
vx_bool  reverse_channel_order 
)

[Graph] Creates a Tensor to Image Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data.
[in]aThe a vx_float32 data.
[in]bThe b vx_float32 data.
[in]reverse_channel_orderThe reverse channel order vx_bool data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxCropAndResizeLayer()

VX_API_ENTRY vx_node VX_API_CALL vxCropAndResizeLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output,
vx_scalar  x_coord,
vx_scalar  y_coord,
vx_scalar  width,
vx_scalar  height,
vx_scalar  scaleFactor,
vx_scalar  mode 
)

[Graph] Creates a Crop_And_Resize Layer Node.

Cropping and Resizing is done on the width and height dimensions of the vx_tensor. Like Upsampling Layer Node, we use the term x for the width dimension and y for the height dimension. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16. There are two modes for the resize: NEAREST_NEIGHBOR(mode = 0, default) and BILINEAR_INTERPOLATION(mode = 1).

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data. Output will have the same number of dimensions as input. Output tensor data type must be same as the inputs.
[in]x_coordThe x coordinate of the upper left point that will be cropped.
[in]y_coordThe y coordinate of the upper left point that will be cropped.
[in]widthThe width of the area that will be cropped.
[in]heightThe height of the are that will be cropped.
[in]scaleFactorThe scale factor that will be used to resize the cropped tensor.
[in]modeThe mode to decide which method will be used for the resize.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxCropLayer()

VX_API_ENTRY vx_node VX_API_CALL vxCropLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  ref,
vx_tensor  output,
vx_scalar  axis,
vx_scalar  offset1,
vx_scalar  offset2,
vx_scalar  offset3,
vx_scalar  offset4 
)

[Graph] Creates a Crop Layer Node.

Cropping is done on the dimensions of the input vx_tensor to fit the dimensions of the reference tensor. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[in]refThe reference tensor data.
[out]outputThe cropped tensor data.
[in]axisThe dimensions including and trailing 'axis' are cropped. [n x c x h x w]
[in]offset1The offset to set the shift for dimension n.
[in]offset2The offset to set the shift for dimension c.
[in]offset3The offset to set the shift for dimension h.
[in]offset4The offset to set the shift for dimension w.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxDetectionOutputLayer()

VX_API_ENTRY vx_node VX_API_CALL vxDetectionOutputLayer ( vx_graph  graph,
vx_tensor  input1,
vx_tensor  input2,
vx_tensor  input3,
vx_int32  num_classes,
vx_int32  share_location,
vx_int32  background_label_id,
vx_float32  nms_threshold,
vx_int32  code_type,
vx_int32  keep_top_k,
vx_int32  variance_encoded_in_target,
vx_tensor  output 
)

[Graph] Creates a Detection Output Layer Node.

Gives the details of the detected ouutputs in an image with their label, confidence and the bounding box coordinates. This function supports three 4D tensors as input and one 4D tensor as ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]input1The first input tensor data (location values).
[in]input2The second input tensor data (confidence values).
[in]input3The third input tensor data (prior box values).
[in]num_classesInteger value: Number of output classes. (example: tiny yolo = 20 classes)
[in]share_locationInteger value: Label values change based on this
[in]background_label_idInteger value: Ignores the background classes
[in]nms_thresholdFloat value: NMS-Threshold for output boxes
[in]code_typeInteger value: Decides if the bounding boxes are Center-type or Corner-type
[in]keep_top_kInteger value: Tells the number of output boxes to keep
[in]variance_encoded_in_targetInteger value: Helps calculate the bounding box coordinates
[out]outputThe output tensor data with the same dimensions as the input tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxGatherLayer()

VX_API_ENTRY vx_node VX_API_CALL vxGatherLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  indices,
vx_tensor  output,
vx_int32  axis 
)

[Graph] Creates a Gather Layer Node.

Given data tensor of rank r >= 1, and indices tensor of rank q, gather entries of the axis dimension of data (by default outer-most one as axis=0) indexed by indices, and concatenates them in an output tensor of rank q + (r - 1).

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data to gather elements on. The type of the tensor can be either float32 or float16.
[in]indicesThe indices tensor containing the index data. The type of the tensor can be either int32 or int64.
[out]outputThe output tensor data with the same type as the input tensor data.
[in]axisThe axis vx_int32 data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxNMSLayer()

VX_API_ENTRY vx_node VX_API_CALL vxNMSLayer ( vx_graph  graph,
vx_tensor  boxes,
vx_tensor  scores,
vx_int32  center_point_box,
vx_tensor  output,
vx_tensor  max_output_boxes_per_class,
vx_tensor  iou_threshold,
vx_tensor  score_threshold 
)

[Graph] Creates a Non Max Suppression Layer Node.

Filter out boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. This function supports 4D tensors as input and ouput. The type of the tensor is int64.

Parameters
[in]graphThe handle to the graph.
[in]boxesThe input tensor data which has coordinates for all the bounding boxes.
[in]scoresThe input tensor data which has scores for all the bounding boxes.
[in]center_point_boxThe input scalar data which tells the format of the coordinates of bounding boxes.
[out]outputThe output tensor data with the dimensions based on the number of selected boxes.
[in]max_output_boxes_per_classThe input tensor int64 data representing the maximum number of boxes to be selected per batch per class.
[in]iou_thresholdThe input tensor float data representing the maximum number of boxes to be selected per batch per class.
[in]score_thresholdThe input tensor float data representing the threshold for deciding when to remove boxes based on score.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxPermuteLayer()

VX_API_ENTRY vx_node VX_API_CALL vxPermuteLayer ( vx_graph  graph,
vx_tensor  input,
vx_array  order,
vx_tensor  output 
)

[Graph] Creates a Permute Layer Node.

Permute is done if the output tensor dimensions change. Otherwise it will do a copy. This function supports 4D tensors as input and output.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[in]orderThe required output tensor dimensions.
Note
Order takes values: - '0' : 0,1,2,3 (eg:nchw->nchw) - '1' : 0,2,3,1 (eg:nchw->nhwc)
Parameters
[out]outputThe output tensor data. Output will have the same number of dimensions as input. Output tensor data type must be same as the inputs. The width, height, batch and channel dimensions of output can be rearranged, but value must be the same as input.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxPriorBoxLayer()

VX_API_ENTRY vx_node VX_API_CALL vxPriorBoxLayer ( vx_graph  graph,
vx_tensor  input_1,
vx_tensor  input_2,
vx_float32  minSize,
vx_array  aspect_ratio,
vx_int32  flip,
vx_int32  clip,
vx_float32  offset,
vx_tensor  output,
vx_array  variance,
vx_float32  maxSize 
)

[Graph] Creates a Prior Box Layer Node.

Prior box gives the coordinates of the bounding boxes for an image. This function supports 4D tensors as input and 3D tensor as output.

Parameters
[in]graphThe handle to the graph.
[in]input_1The input tensor data (output of the previous layer)
[in]input_2The input tensor data (image data)
[in]minSizeThe size for the first prior
[in]aspect_ratioArray of floats for different bounding boxes, with varying aspect ratio
[in]flipInput indicating whether aspect ratio can be flipped. Can take values 1(true)/0(false)
[in]clipInput indicating whether bounding box coordinates should be within [0,1]. Can take values 1(true)/0(false)
[in]offsetFloat value to give an offset for each bounding box
[out]outputThe output tensor data. Output tensor data type must be float. The batch dimensions of output and input must be same. The channel dimensions of the output will be 2. The 3rd dimension will depend on number of boxes.
[in]varianceThe variance of each prior (optional)
[in]maxSizeThe size for the first prior (optional)
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxReduceMinLayer()

VX_API_ENTRY vx_node VX_API_CALL vxReduceMinLayer ( vx_graph  graph,
vx_tensor  data,
vx_array  axes,
vx_int32  keepdims,
vx_tensor  reduced 
)

[Graph] Creates a Reduce Min Layer Node.

Computes the min of the input tensor's element along the provided axes.

Parameters
[in]graphThe handle to the graph.
[in]dataThe input tensor data.
[in]axesA list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor. Accepted range is [-r, r-1] where r = rank(data).
[in]keepdimsKeep the reduced dimension or not, default 1 mean keep reduced dimension.
[out]reducedThe output tensor data with the dimensions based axes and keepdims.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxReshapeLayer()

VX_API_ENTRY vx_node VX_API_CALL vxReshapeLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output 
)

[Graph] Creates a Convolutional Network Reshape Layer Node.

Reshaping is done with alias if available (output tensor will point to input tensor memory). Otherwise it will do a copy. This function supports 4D tensors as input and output.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data. Output will have the same number of dimensions as input. Output tensor data type must be same as the inputs. The width and height dimensions of output must be integer multiple of input. The batch and channel dimensions of output and input must be same.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxScaleLayer()

VX_API_ENTRY vx_node VX_API_CALL vxScaleLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  scale,
vx_tensor  bias,
vx_tensor  output 
)

[Graph] Creates a Scale Layer Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[in]scaleThe scale tensor data.
[in]biasThe bias tensor data.
[out]outputThe output tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxSliceLayer()

VX_API_ENTRY vx_node VX_API_CALL vxSliceLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output1,
vx_tensor  output2,
vx_tensor  output3,
vx_tensor  output4,
vx_tensor  output5,
vx_tensor  output6,
vx_tensor  output7,
vx_tensor  output8 
)

[Graph] Creates a Slice Layer Node.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]output1The output 1 tensor data.
[out]output2The output 2 tensor data.
[out]output3The output 3 tensor data.
[out]output4The output 4 tensor data.
[out]output5The output 5 tensor data.
[out]output6The output 6 tensor data.
[out]output7The output 7 tensor data.
[out]output8The output 8 tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTensorCompareNode()

VX_API_ENTRY vx_node VX_API_CALL vxTensorCompareNode ( vx_graph  graph,
vx_tensor  input,
vx_tensor  input2,
vx_tensor  output 
)

[Graph] Creates a Tensor Compare Node.

Returns the tensor resulted from performing the comparison operation elementwise on the input tensors A and B. This function supports 4D tensors as input and ouput.

Parameters
[in]graphThe handle to the graph.
[in]inputThe first input tensor data.
[in]input2The second input tensor data.
[out]outputThe output tensor data with the same dimensions as the input tensor data. The type of the output is constraint to boolean.
Note
Supports the following mode values: - 0 - Less than (<) - 1 - Greater than (>) - 2 - Less than or equal to (<=) - 3 - Greater than or equal to (>=) - 4 - Equal to (==) - 5 - Not equal to (!=)
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTensorExpNode()

VX_API_ENTRY vx_node VX_API_CALL vxTensorExpNode ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output 
)

[Graph] Creates a Tensor_Exp Layer Node.

Calculates the element-wise exponential of the element values in the input vx_tensor. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data with the same dimensions as the input tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTensorLogNode()

VX_API_ENTRY vx_node VX_API_CALL vxTensorLogNode ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output 
)

[Graph] Creates a Tensor_Log Layer Node.

Calculates the element-wise natural log of the element values in the input vx_tensor. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data with the same dimensions as the input tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTensorMaxNode()

VX_API_ENTRY vx_node VX_API_CALL vxTensorMaxNode ( vx_graph  graph,
vx_tensor  input,
vx_tensor  input2,
vx_tensor  output 
)

[Graph] Creates a Tensor_Max Layer Node.

Performs element-wise max on element values in the input vx_tensor. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]inputThe first input tensor data.
[in]input2The second input tensor data. The dimensions and sizes of input2 match those of input1, unless the vx_tensor of one or more dimensions in input2 is 1. In this case, those dimensions are treated as if this tensor was expanded to match the size of the corresponding dimension of input1, and data was duplicated on all terms in that dimension. After this expansion, the dimensions will be equal. The data type must match the data type of input1.
[out]outputThe output tensor data with the same dimensions as the input tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTensorMinNode()

VX_API_ENTRY vx_node VX_API_CALL vxTensorMinNode ( vx_graph  graph,
vx_tensor  input,
vx_tensor  input2,
vx_tensor  output 
)

[Graph] Creates a Tensor_Min Layer Node.

Performs element-wise min on element values in the input vx_tensor. This function supports 4D tensors as input and ouput. The type of the tensor can be either float32 or float16.

Parameters
[in]graphThe handle to the graph.
[in]inputThe first input tensor data.
[in]input2The second input tensor data. The dimensions and sizes of input2 match those of input1, unless the vx_tensor of one or more dimensions in input2 is 1. In this case, those dimensions are treated as if this tensor was expanded to match the size of the corresponding dimension of input1, and data was duplicated on all terms in that dimension. After this expansion, the dimensions will be equal. The data type must match the data type of input1.
[out]outputThe output tensor data with the same dimensions as the input tensor data.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTileLayer()

VX_API_ENTRY vx_node VX_API_CALL vxTileLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  repeats,
vx_tensor  output 
)

[Graph] Creates a Tile Layer Node.

Constructs a tensor by tiling a given tensor.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[in]repeats1D int64 tensor of the same length as input's dimension number, includes numbers of repeated copies along input's dimensions.
[out]outputOutput tensor of the same dimension and type as tensor input. output_dim[i] = input_dim[i] * repeats[i]
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxTopKLayer()

VX_API_ENTRY vx_node VX_API_CALL vxTopKLayer ( vx_graph  graph,
vx_tensor  x_tensor,
vx_tensor  k_tensor,
vx_int32  axis,
vx_int32  largest,
vx_int32  sorted,
vx_tensor  values,
vx_tensor  indices 
)

[Graph] Creates a TopK Layer Node.

Retrieve the top-K largest or smallest elements along a specified axis. This function supports 4D tensors as input and ouput.

Parameters
[in]graphThe handle to the graph.
[in]x_tensorThe input tensor data.
[in]k_tensorThe 1-D input tensor data containing a single positive value corresponding to the number of top elements to retrieve.
[in]axisThe axis vx_int32 data.
[in]largestThe largest vx_int32 data.
[in]sortedThe sorted vx_int32 data
[out]valuesThe output tensor data containing top K values from the input 'x_tensor'.
[out]indicesThe output tensor data containing the corresponding input tensor indices for the top K values.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxUpsampleNearestLayer()

VX_API_ENTRY vx_node VX_API_CALL vxUpsampleNearestLayer ( vx_graph  graph,
vx_tensor  input,
vx_tensor  output 
)

[Graph] Creates a Convolutional Network Upsampling Layer Node.

Upsampling is done on the width and height dimensions of the vx_tensor. Therefore, we use here the term x for the width dimension and y for the height dimension. The Upsampling accept input images as tensors of several types. They always output resized images as float32 tensors. This function supports 4D and 3D tensors as input and output. 4D tensors are for batches of images, 3D tensors for individual images. Upsampling use resize method NEAREST_NEIGHBOR.

Parameters
[in]graphThe handle to the graph.
[in]inputThe input tensor data.
[out]outputThe output tensor data. Output will have the same number of dimensions as input. Output tensor data type must be same as the inputs. The width and height dimensions of output must be integer multiple of input. The batch and channel dimensions of output and input must be same.
Returns
vx_node.
A node reference vx_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.