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

21 lines
977 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.ops.TrilIndices
==========================
.. py:class:: mindspore.ops.TrilIndices(row, col, offset=0, dtype=mstype.int32)
计算二维矩阵的下三角元素的索引并将它们作为一个Tensor返回。
.. warning::
这是一个实验性API后续可能修改或删除。
更多参考详见 :func:`mindspore.ops.tril_indices`
参数:
- **row** (int) - 二维矩阵的行数。
- **col** (int) - 二维矩阵的列数。
- **offset** (int, 可选) - 对角线偏移量。默认值: ``0``
- **dtype** (:class:`mindspore.dtype`, 可选) - 指定输出Tensor的数据类型支持的数据类型为 ``mstype.int32````mstype.int64`` ,默认值: ``mstype.int32``
输出:
- **y** (Tensor) - 矩阵的下三角元素的索引。数据类型由 `dtype` 指定shape为 :math:`(2, tril\_size)` ,其中, :math:`tril\_size` 为下三角矩阵的元素总数。