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

21 lines
569 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.LinSpace
======================
.. py:class:: mindspore.ops.LinSpace
创建一个一维Tensor其包含steps个元素这些元素在区间[start, end]内均匀分布。
.. math::
\begin{aligned}
&step = (end - start)/(steps - 1)\\
&output = [start, start+step, start+2*step, ... , end]
\end{aligned}
输入:
- **start** (Tensor) - 区间的起始值。
- **stop** (Tensor) - 区间的末尾值。
- **num** (Union[int, Tensor]) - 元素数量。
输出:
Tensor