Description: Returns the matrix norm or vector norm of a given tensor.
Formula: Supports the 1-norm, 2-norm, infinity norm, and other norms where p is a float value.
p = 1 norm:
p = 2 norm (default value):
p = infinity norm:
p = other norms:
Each operator has calls. First, aclnnNormGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnNorm is called to perform computation.
[object Object]
[object Object]
Parameters
[object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
- Deterministic compute
- aclnnNorm defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic compute.
The following example is for reference only. For details, see .
[object Object]