mindspore/docs/api/api_python/mint/mindspore.mint.func_outer.rst

21 lines
862 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.mint.outer
====================
.. py:function:: mindspore.mint.outer(input, vec2)
计算 `input``vec2` 的外积。如果向量 `input` 长度为 :math:`n` `vec2` 长度为 :math:`m` 则输出矩阵shape为 :math:`(n, m)`
.. note::
该函数不支持广播。
参数:
- **input** (Tensor) - 输入一维向量。
- **vec2** (Tensor) - 输入一维向量。
返回:
out两个一维向量的外积是一个二维矩阵。
异常:
- **TypeError** - 如果 `input``vec2` 不是Tensor。
- **TypeError** - `input``vec2` 隐式转换后的数据类型不是float16、float32、float64、bool、uint8、int8、int16、int32、int64、complex64、complex128、bfloat16之一
- **ValueError** - 如果 `input``vec2` 的维度不是1。