This API is used to calculate the p-norm distance between each pair of row vectors in the input self.
Formula:
Assume that the shape of the input self is [N, M], and indicates the element whose subscript is n in row i of self. The formula for calculating the norm distance between row i and row j is as follows:
The shape of out is [], where the elements are arranged in the following order: , ..., ,, ... , ...,
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
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 computing:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .