Image processing algorithm, which is used to obtain the minimum and maximum values of the input tensor. The data types float16, float32, and uint8 are supported.
Only Atlas inference product support this API.
The following conditions must be met:
1 | APP_ERROR MinMax(const Tensor &src, Tensor &minVal, Tensor &maxVal, AscendStream &stream = AscendStream::DefaultStream()); |
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Tensor class, input tensor, supporting the float16, float32, and uint8 data types. |
minVal |
Output |
Tensor class, minimum value, output tensor. The data type is the same as that of src. An empty tensor can be passed. If minVal is not an empty tensor, call Tensor.Malloc() to allocate memory in advance. |
maxVal |
Output |
Tensor class, maximum value, output tensor. The data type is the same as that of src. An empty tensor can be passed. If maxVal is not an empty tensor, call Tensor.Malloc() to allocate memory in advance. |
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. |