You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.ReverseSequence.rst 710 B

123456789101112131415161718192021222324
  1. mindspore.ops.ReverseSequence
  2. ==============================
  3. .. py:class:: mindspore.ops.ReverseSequence(seq_dim, batch_dim=0)
  4. 对输入序列进行部分反转。
  5. **参数:**
  6. - **seq_dim** (int) - 指定反转的维度,此值为必填参数。
  7. - **batch_dim** (int) - 指定切片维度。默认值:0。
  8. **输入:**
  9. - **x** (Tensor) - 输入需反转的数据,其数据类型支持包括bool在内的所有数值型。
  10. - **seq_lengths** (Tensor) - 指定反转长度,为一维向量,其数据类型为int32或int64。
  11. **输出:**
  12. shape和数据类型与输入相同。
  13. **异常:**
  14. - **TypeError** - `seq_dim` 或 `batch_dim` 不是int。