# tensorplay.nn.functional.pairwise_distance

Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pairwise_distance.html

# tensorplay.nn.functional.pairwise_distance

tensorplay.nn.functional.pairwise_distance(x1: TensorBase, x2: TensorBase, p: [float](https://docs.python.org/3/library/functions.html#float) = 2.0, eps: [float](https://docs.python.org/3/library/functions.html#float) = 1e-06, keepdim: [bool](https://docs.python.org/3/library/functions.html#bool) = False) &#x2192; TensorBase[[source]](../_modules/tensorplay/nn/functional.html#pairwise_distance)

Computes the pairwise distance between input vectors.

Port of aten::pairwise_distance: norm(x1 - x2 + eps, p) over the last
dimension.
