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

22 lines
994 B
ReStructuredText
Raw Normal View History

mindspore.ops.ger
=================
.. py:function:: mindspore.ops.ger(x1, x2)
计算输入一维Tensor `x1``x2` 的外积。如果 `x1` shape为 :math:`(m,)` `x2` shape为 :math:`(n,)` 则输出的shape为 :math:`(m, n)`
2022-06-30 20:51:17 +08:00
.. note::
Ascend不支持float64数据格式的输入。
2022-07-25 17:18:38 +08:00
参数:
- **x1** (Tensor) - 输入1-D Tensor数据类型为float16、float32或float64。
- **x2** (Tensor) - 输入1-D Tensor数据类型为float16、float32或float64输入数据类型需和 `x1` 保持一致。
2022-07-25 17:18:38 +08:00
返回:
Tensor`x1` 数据类型相同的输出Tensor。如果 `x1` shape为 :math:`(m,)` `x2` shape为 :math:`(n,)` 则输出的shape为 :math:`(m, n)`
2022-07-25 17:18:38 +08:00
异常:
- **TypeError** - `x1``x2` 不是一维Tensor。
- **TypeError** - 输入的 `x1``x2` 数据类型不是float16、float32或float64。
- **TypeError** - 输入的 `x1``x2` 数据类型不一致。