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

24 lines
701 B
ReStructuredText
Raw 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.inner
====================
.. py:function:: mindspore.ops.inner(x, other)
计算两个1D Tensor的点积。
对于1D Tensor没有复数共轭的情况返回两个向量的点积。
对于更高的维度,返回最后一个轴上的和积。
.. note::
如果 `x``other` 之一是标量,那么 :func:`mindspore.ops.inner` 相当于 :func:`mindspore.ops.mul`
参数:
- **x** (Tensor) - 第一个输入。
- **other** (Tensor) - 第二个输入。
返回:
Tensor内积的结果。
异常:
- **ValueError** - 如果 `x``other` 都不是标量,且两者的最后一维不相同。