mindspore/docs/api/api_python/ops/mindspore.ops.Pdist.rst

21 lines
675 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.Pdist
===================
.. py:class:: mindspore.ops.Pdist(p=2.0)
计算输入中每对行向量之间的p-范数距离。
更多细节请参考 :func:`mindspore.ops.pdist`
.. note::
Pdist算子由于涉及求幂次方运算在float16类型输入场景下很容易会因为数值溢出而产生inf/nan的计算结果建议采用float32类型输入。
参数:
- **p** (float可选) - 范数距离的阶, :math:`p∈[0, ∞)`。默认值: ``2.0``
输入:
- **x** (Tensor) - 输入Tensor。类型float16、float32或float64。
输出:
Tensor类型与 `x` 一致。