Computes the batchwise pairwise distance between vectors
Shape
Input1:
whereD = vector dimension
Input2:
, same shape as the Input1Output:
. Ifkeepdim
isTRUE
, then .
Examples
if (torch_is_installed()) {
pdist <- nn_pairwise_distance(p = 2)
input1 <- torch_randn(100, 128)
input2 <- torch_randn(100, 128)
output <- pdist(input1, input2)
}