mindspore/docs/api/api_python/numpy/mindspore.numpy.multi_dot.rst

22 lines
907 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.numpy.multi_dot
=========================
.. py:function:: mindspore.numpy.multi_dot(arrays)
计算两个或更多个数组的点积,同时自动选择最快的计算顺序。
multi_dot将链式调用numpy.dot并使用矩阵的最佳括号化。
根据矩阵的shape这可以大大加快乘法速度。 如果第一个参数是一维的,则将其视为行向量。
如果最后一个参数是一维的,则将其视为列向量。 其他参数必须是二维的。
.. note::
不支持NumPy参数 `out`
参数:
- **arrays** (类数组的序列) - 如果第一个参数是一维的,则将其视为行向量。如果最后一个参数是一维的,则将其视为列向量。其他参数必须是二维的。
返回:
Tensor所提供数组的点积。
异常:
- **ValueError** - 数组不是二维的。