Description: Returns the median of all elements after NAN is ignored.
Example:
Each operator has calls. First, aclnnNanMedianGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnNanMedian is called to perform computation.
[object Object][object Object]
Parameters:
self (aclTensor*, compute input): aclTensor on the device. are supported. The can be ND.
- [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, or INT64.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT, FLOAT16, BFLOAT16, UINT8, INT8, INT16, INT32, or INT64. When the data type of self is BFLOAT16, self.shape[-1] cannot be 1.
out (aclTensor*, compute output): aclTensor on the device. The data type is the same as that of self. out is a zero-dimensional tensor. are supported. The can be ND.
- [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, UINT8, INT8, INT16, INT32, or INT64.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT, FLOAT16, BFLOAT16, UINT8, INT8, INT16, INT32, or INT64.
workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
Returns:
Parameters:
workspace (void*, input): address of the workspace to be allocated on the device.
workspaceSize (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by the first-phase API aclnnNanMedianGetWorkspaceSize.
executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
stream (aclrtStream, input): stream for executing the task.
Returns:
Deterministic compute:
- aclnnNanMedian defaults to a deterministic implementation.
If the data type of self is not FLOAT, FLOAT16, or BFLOAT16, the operator execution may time out due to an overlarge tensor size (an AI CPU error is reported, with reason=[aicpu timeout]). The maximum size for each data type (closely related to the remaining memory of the machine) is as follows:
- INT64: 150000000
- UINT8, INT8, INT16, INT32: 725000000
The following example is for reference only. For details, see .