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

32 lines
781 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.vecdot
====================
.. py:function:: mindspore.ops.vecdot(x, y, *, axis=-1)
按指定轴,计算两批向量的点积。
支持广播。
计算公式如下,
如果 `x` 是复数向量,:math:`\bar{x_{i}}` 表示向量中元素的共轭;如果 `x` 是实数向量,:math:`\bar{x_{i}}` 表示向量中元素本身。
.. math::
\sum_{i=1}^{n} \bar{x_{i}}{y_{i}}
.. warning::
这是一个实验性API后续可能修改或删除。
参数:
- **x** (Tensor) - 第一批tensor。
- **y** (Tensor) - 第二批tensor。
关键字参数:
- **axis** (int) - 指定轴。默认 ``-1``
返回:
Tensor
.. note::
当前在GPU上不支持复数。