mindspore2022/docs/api/api_python/ops/mindspore.ops.ReverseSequen...

24 lines
710 B
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.ReverseSequence
==============================
.. py:class:: mindspore.ops.ReverseSequence(seq_dim, batch_dim=0)
对输入序列进行部分反转。
**参数:**
- **seq_dim** (int) - 指定反转的维度,此值为必填参数。
- **batch_dim** (int) - 指定切片维度。默认值0。
**输入:**
- **x** (Tensor) - 输入需反转的数据其数据类型支持包括bool在内的所有数值型。
- **seq_lengths** (Tensor) - 指定反转长度为一维向量其数据类型为int32或int64。
**输出:**
shape和数据类型与输入相同。
**异常:**
- **TypeError** - `seq_dim``batch_dim` 不是int。