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

21 lines
583 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.narrow
=====================
.. py:function:: mindspore.ops.narrow(inputs, axis, start, length)
沿着指定的轴指定起始位置获取指定长度的Tensor。
参数:
- **inputs** (Tensor) - 需要计算的Tensor。
- **axis** (int) - 指定的轴。
- **start** (int) - 指定起始位置。
- **length** (int) - 指定长度。
返回:
Tensor。
- output (Tensors) - 计算后的Tensor。
异常:
- **TypeError** - 如果输入不是Tensor、元组或Tensor组成的列表。