Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon][Add API Legend No.37]增加unbind图例和文档说明 #6780

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/api/paddle/unbind_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ unbind

.. py:function:: paddle.unbind(input, axis=0)

将输入 Tensor 按照指定的维度分割成多个子 Tensor。

下图展示了一个形状为 [3, 4, 5] 的三维张量在通过沿 axis0 进行 unbind 操作之后转变为三个形状为 [4, 5] 的二维张量。值得注意的是沿着 axis0 进行 unbind 操作仅能返回三个张量,沿着 axis1 进行 unbind 进行操作仅能返回四个张量。


将输入 Tensor 按照指定的维度分割成多个子 Tensor。
.. image:: ../../images/api_legend/unbind.png
:alt: 图例
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. image:: ../../images/api_legend/unbind.png
:alt: 图例
.. image:: ../../images/api_legend/unbind.png
:width: 700
:alt: 图例

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照要求修改了,麻烦看一下


参数
:::::::::
Expand Down
Binary file added docs/images/api_legend/unbind.png
Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这图片有点乱,可以简化一些,比如可以举一个 shape 为 [2, 3, 4] 的例子。绘图工具也不一定要用第三方代码库,ppt 做也可以。 能清晰展示即可

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 感觉 3d tensor 展现的有些没那么直观,可以参考其他展现形式,如
4b49adedd9592b1a0bb3f5750498b8f5

我也简单给你画一个,比如可以参考
image

  • unbind 二维后的 tensor,用 axis = xx 代替 rows 和 columns
  • 图片尽量美观些~

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.