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

18 lines
1.1 KiB
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.ops.Meshgrid
======================
.. py:class:: mindspore.ops.Meshgrid(indexing='xy')
从给定的Tensor生成网格矩阵。给定N个一维Tensor对每个Tensor做扩张操作返回N个N维的Tensor。
更多参考详见 :func:`mindspore.ops.meshgrid`
参数:
- **indexing** (str, 可选) - 以笛卡尔坐标 ``'xy'`` 或者矩阵 ``'ij'`` 索引作为输出。对于长度为 `M``N` 的二维输入,取值为 ``'xy'``输出的shape为 :math:`(N, M)` ,取值为 ``'ij'``输出的shape为 :math:`(M, N)` 。对于长度为 `M``N``P` 的三维输入,取值为 ``'xy'``输出的shape为 :math:`(N, M, P)` ,取值为 ``'ij'``输出的shape为 :math:`(M, N, P)` 。默认值: ``'xy'``
输入:
- **inputs** (Union(tuple[Tensor], list[Tensor])) - 静态图下为N个一维Tensor输入的Tensor个数应大于1。动态图下为N个零维或一维Tensor输入的Tensor个数应大于0。数据类型为Number。
输出:
TensorN个N维Tensor对象的元组。数据类型与输入相同。