nnf_pdist | R Documentation |
Computes the p-norm distance between every pair of row vectors in the input.
This is identical to the upper triangular portion, excluding the diagonal, of
torch_norm(input[:, None] - input, dim=2, p=p)
. This function will be faster
if the rows are contiguous.
nnf_pdist(input, p = 2)
input |
input tensor of shape |
p |
p value for the p-norm distance to calculate between each vector pair
|
If input has shape N \times M
then the output will have shape
\frac{1}{2} N (N - 1)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.