Image processing algorithm, which is used to calculate the sum of absolute values of tensors. float32 and uint8 are supported. Asynchronous calling is supported.
Only Atlas inference product support this API.
The following conditions must be met:
1 | APP_ERROR AbsSum(const Tensor &src, Tensor &dst, AscendStream &stream = AscendStream::DefaultStream()); |
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Tensor class, input tensor, supporting the float32 and uint8 data types. |
dst |
Output |
Tensor class, output tensor, supporting the float32 data type. An empty tensor can be passed. If dst is not an empty tensor, call Tensor.Malloc() to allocate memory in advance. The shape of the input tensor is HWC, and the shape of the output tensor is C. For example, if the input tensor shape is [16,16,3], the output tensor shape is [3]. |
stream |
Input |
AscendStream type. The default value is AscendStream::DefaultStream(). When the parameter value is the default value, the API calling is a synchronous operation. In other cases, the API calling is an asynchronous operation. |
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |