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.Concat.rst 1.3 kB

123456789101112131415161718192021222324252627282930
  1. mindspore.ops.Concat
  2. =====================
  3. .. py:class:: mindspore.ops.Concat(axis=0)
  4. 在指定轴上拼接输入Tensor。
  5. 输入的是一个tuple。其元素秩相同,即 `R` 。将给定的轴设为 `m` ,并且 :math:`0 \le m < R` 。数量设为 `N` 。对于第 :math:`i` 个数据, :math:`t_i` 的shape为 `(x_1, x_2, ..., x_{mi}, ..., x_R)` 。 :math:`x_{mi}` 是第 :math:`i` 个元素的第 :math:`m` 个维度。然后,输出tensor的shape为:
  6. .. math::
  7. (x_1, x_2, ..., \sum_{i=1}^Nx_{mi}, ..., x_R)
  8. .. note::
  9. "axis"的取值范围为[-dims, dims - 1]。"dims"为"input_x"的维度长度。
  10. **参数:**
  11. - **axis** (int) - 表示指定的轴。默认值:0。
  12. **输入:**
  13. - **input_x** (tuple, list) - 输入为Tensor tuple或Tensor list。假设在这个tuple或list中有两个Tensor,即x1和x2。要在0轴方向上执行 `Concat` ,除0轴外,所有其他轴都应相等,即 :math:`x1.shape[1] == x2.shape[1],x1.shape[2] == x2.shape[2],...,x1.shape[R] == x2.shape[R]` ,其中 :math:`R` 表示最后一个轴。
  14. **输出:**
  15. Tensor,shape为 :math:`(x_1, x_2, ..., \sum_{i=1}^Nx_{mi}, ..., x_R)` 。数据类型与 `input_x` 相同。
  16. **异常:**
  17. - **TypeError** - `axis` 不是int。