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

23 lines
1.0 KiB
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.Range
====================
.. py:class:: mindspore.ops.Range(maxlen=1000000)
产生一系列从 `start` 开始, 步长为 `delta`, 且不超过 `limit` 的数据(不包括 `limit` 本身)。
三个输入的数据类型必须相同。 函数返回的Tensor的数据类型与输入数据类型保持一致。
**参数:**
- **maxlen** (int) - 该算子将会被分配能够存储 `maxlen` 个数据的内存。 该参数是可选的必须为正数且默认值为1000000。 如果输出的数量超过 `maxlen` ,将会引起运行时错误。
**输入:**
- **start** (Tensor) - 标量Tensor序列中的第一个数字。数据类型必须为int32或者float32。
- **limit** (Tensor) - 标量Tensor序列中的数值上线不包括其本身。数据类型必须为int32或者float32。
- **delta** (Tensor) - 标量Tensor表述序列中数值的步长。数据类型必须为int32或者float32。
**输出:**
一维Tensor数据类型与输入数据类型一致。