Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nnf_pairwise_distance

Pairwise_distance


Description

Computes the batchwise pairwise distance between vectors using the p-norm.

Usage

nnf_pairwise_distance(x1, x2, p = 2, eps = 1e-06, keepdim = FALSE)

Arguments

x1

(Tensor) First input.

x2

(Tensor) Second input (of size matching x1).

p

the norm degree. Default: 2

eps

(float, optional) Small value to avoid division by zero. Default: 1e-8

keepdim

Determines whether or not to keep the vector dimension. Default: False


torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.