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

20 lines
666 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.mv
=================
.. py:function:: mindspore.ops.mv(mat, vec)
实现矩阵 `mat` 和向量 `vec` 相乘。
如果 `mat` 是shape为 :math:`(N, M)` 的Tensor `vec` 是长度为 :math:`M` 的一维Tensor则输出是长度为 :math:`N` 的一维Tensor。
参数:
- **mat** (Tensor) - 输入矩阵其shape为 :math:`(N, M)`
- **vec** (Tensor) - 输入向量其shape为 :math:`(M,)`
返回:
Tensor其shape为 :math:`(N,)`
异常:
- **TypeError** - `mat``vec` 不是Tensor。
- **ValueError** - `mat` 不是二维Tensor或 `vec` 不是一维Tensor。