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

17 lines
639 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.Slice
====================
.. py:class:: mindspore.ops.Slice
根据指定shape对输入Tensor进行切片。
更多参考详见 :func:`mindspore.ops.slice`
输入:
- **input_x** (Tensor) - Slice的输入任意维度的Tensor。其shape为 :math:`(N, *)` ,其中 :math:`*` 为任意数量的额外维度。
- **begin** (Union[tuple, list]) - 切片的起始位置。只支持常量值(>=0
- **size** (Union[tuple, list]) - 切片的大小。只支持常量值。
输出:
Tensorshape与输入 `size` 相同,数据类型与输入 `input_x` 相同。