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

20 lines
616 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的点积。对于更高维度来说计算结果为在最后一维上逐元素乘法的和。
.. note::
如果 `x``other` 之一是标量,那么相当于 :func:`mindspore.ops.mul(x, other)`
参数:
- **x** (Tensor) - 第一个输入。
- **other** (Tensor) - 第二个输入。
返回:
Tensor内积的结果。
异常:
- **ValueError** - 如果 `x``other` 都不是标量,且两者的最后一维不相同。