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

18 lines
712 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.hstack
====================
.. py:function:: mindspore.ops.hstack(tensors)
将多个tensor沿着水平方向堆叠。
.. note::
-`graph mode <https://www.mindspore.cn/tutorials/zh-CN/master/compile/static_graph.html>`_ 下,不支持 ``mindspore.float64`` 类型的8-D tensor的动态rank输入。
- 对于一维tensor沿第一个轴堆叠。其他维度的tensor沿第二个轴堆叠。
- 对于维度大于一的tensor除了第二个轴外所有tensor的shape必须相同。对于一维tensor可拥有任意的长度。
参数:
- **tensors** (Union[tuple[Tensor], list[Tensor]]) - 输入tensors。
返回:
Tensor