divide

Function Usage

Image processing algorithms, tensor divide algorithm, supporting dtype.float16, dtype.float32, and dtype.uint8.

It is supported by the Atlas inference product and Atlas 200I/500 A2 inference product.

  • The input and output tensors must be on the device.
  • The input parameters cannot exceed four dimensions, and must match the tensor shapes.
  • The scale parameter can be passed only on the Atlas inference product. Different input data types are supported. The output data type is the same as that of the input tensor with high precision.
  • Handle the issue of out-of-range data type if any.

Prototype

divide(inputTensor1: Tensor, inputTensor2: Tensor, scale)

Input Parameters

Parameter

Type

Description

inputTensor1

Tensor class

Dividend, input tensor, supporting dtype.float16, dtype.float32, and dtype.uint8 data types.

inputTensor2

Tensor class

Divisor, input tensor, supporting dtype.float16, dtype.float32 and dtype.uint8 data types.

scale

float

(Optional) Multiplier for scaling the dividend. This parameter is supported only on the Atlas inference product.

Response Parameters

Tensor data after the division