Skip to content

Commit

Permalink
[Docathon][Add API Legend No.56,57] + add new images and change api d…
Browse files Browse the repository at this point in the history
…ocument(PaddlePaddle#6912)
  • Loading branch information
Xiao You authored Oct 16, 2024
1 parent 00e8d39 commit 193e79f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/api/paddle/column_stack_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ column_stack
沿水平轴堆叠输入 ``x`` 中的所有张量。 ``x`` 中的每个张量 ``tensor`` 如果在堆叠之前 ``tensor.ndim < 2`` ,则首先被整形为 ``(tensor.numel(), 1)``。所有张量必须具有相同的数据类型。

下图展示了一个 column_stack 的情形,将一个形状为(3,1)的二维张量与一个形状为(3,)的一维张量进行 column_stack 操作,其中一维张量首先被整形为(3,1),然后再沿水平轴堆叠输入所有张量。通过图例能很好看出张量的变化。

.. image:: ../../images/api_legend/column_stack.png
:width: 600
:alt: 图例

参数
::::::::::::

Expand Down
6 changes: 6 additions & 0 deletions docs/api/paddle/row_stack_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ row_stack
:ref:`cn_api_paddle_vstack` 的别名。沿垂直轴堆叠输入 ``x`` 中的所有张量。所有张量必须具有相同的数据类型。

下图展示了一个 row_stack 的情形,将一个形状为(1,3)的二维张量与另一个同样形状为(1,3),但是数据内容不同的二维张量进行 row_stack 操作,二者沿垂直轴堆叠成一个新的二维向量。通过图例能很好看出张量的变化。

.. image:: ../../images/api_legend/row_stack.png
:width: 600
:alt: 图例

参数
::::::::::::

Expand Down
Binary file added docs/images/api_legend/column_stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/api_legend/row_stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 193e79f

Please sign in to comment.