!35554 update pdist docs

Merge pull request !35554 from hemaohua/master
This commit is contained in:
i-robot 2022-06-08 06:34:38 +00:00 committed by Gitee
commit b76a64d1fa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ mindspore.ops.pdist
.. py:function:: mindspore.ops.pdist(x, p=2.0)
计算输入中每对行向量之间的p-范数距离。如果输入 `x` 的shape为 :math:`(N, M)`那么输出就是一个shape为 :math:`(N * (N - 1) / 2,)` 的Tensor。
如果 `x` 的shape为 :math:`(*B, N, M)`那么输出就是一个shape为 :math:`(*B, N * (N - 1) / 2)` 的Tensor。
如果输入 `x` 的shape为 :math:`(*B, N, M)`那么输出就是一个shape为 :math:`(*B, N * (N - 1) / 2)` 的Tensor。
.. math::
y[n] = \sqrt[p]{{\mid x_{i} - x_{j} \mid}^p}

View File

@ -310,7 +310,7 @@ def deformable_conv2d(x, weight, offsets, kernel_size, strides, padding, bias=No
def pdist(x, p=2.0):
r"""
Computes the p-norm distance between each pair of row vectors in the input. If `x` is a 2D Tensor of
shape :math:`(N, M)`, then `output` must be a 1D Tensor of shape :math:`(N * (N - 1) / 2,)`. If `x` id a
shape :math:`(N, M)`, then `output` must be a 1D Tensor of shape :math:`(N * (N - 1) / 2,)`. If `x` is a
Tensor of shape :math:`(*B, N, M)`, then `output` must be a Tensor of shape :math:`(*B, N * (N - 1) / 2)`.
.. math::
@ -319,7 +319,7 @@ def pdist(x, p=2.0):
where :math:`x_{i}, x_{j}` are two different row vectors in the input.
Args:
x (Tensor) - Input tensor of shape :math:`(*B, N, M)`. :math:`*B` is batch size, one-dim or multi-dim.
x (Tensor): Input tensor of shape :math:`(*B, N, M)`. :math:`*B` is batch size, one-dim or multi-dim.
dtype: float16, float32 or float64.
p (float): p value for the p-norm distance to calculate between each vector pair. :math:`p[0,]`. Default: 2.0.