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.Split.rst 915 B

1234567891011121314151617181920212223242526
  1. mindspore.ops.Split
  2. ====================
  3. .. py:class:: mindspore.ops.Split(axis=0, output_num=1)
  4. 根据指定的轴和分割数量对输入Tensor进行分割。
  5. `input_x` Tensor将被分割为相同shape的子Tensor,且要求 `input_x.shape(axis)` 可被 `output_num` 整除。
  6. **参数:**
  7. - **axis** (int) - 指定分割轴。默认值:0。
  8. - **output_num** (int) - 指定分割数量。其值为正整数。默认值:1。
  9. **输入:**
  10. - **input_x** (Tensor) - Tensor的shape为 :math:`(x_1, x_2, ..., x_R)` 。
  11. **输出:**
  12. tuple[Tensor],每个输出Tensor的shape相同,即 :math:`(y_1, y_2, ..., y_S)` 。数据类型与 `input_x` 的相同。
  13. **异常:**
  14. - **TypeError** - `axis` 或 `output_num` 不是int。
  15. - **ValueError** - `axis` 超出[-len(`input_x.shape`), len(`input_x.shape`))范围。或 `output_num` 小于或等于0。