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.9]add flatten lenged #6770

Merged
merged 8 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions docs/api/paddle/flatten_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ flatten
得到:
Out.shape = (3 * 100 * 100 * 4)

下图展示了一个[3, 3, 3]的Tensor在经过不同参数的Flatten后的形状。数据依次为0到26,数值与颜色映射关系图中已给出。其中,标注"x"的坐标轴为最低维度,"y"为次低维度,第三轴同理(如果有)。

可以看到,在通过不同参数的Flatten后,Tensor在start_axis与stop_axis维度间按照升序顺序重新排列元素。

.. image:: ../../images/api_legend/flatten.png
:alt: 图例
:width: 500
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
:width: 500
:width: 700

好像调的太小了...调大一点


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

Expand Down
Binary file added docs/images/api_legend/flatten.png
Copy link
Collaborator

Choose a reason for hiding this comment

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

很棒~有几点需要优化一下

  • 轴的名称用 axis = 0 axis = 1 等来说明,用 x y 会比较模糊
  • 右边 flatten 后的三张图片感觉放一列有点挤?可以看看放一行效果怎样
  • 可以举个shape 为 [2,2,2] 的例子,因为 [3,3,3] 好像图片会比较大
  • 最好 flatten 后展示的也是正方形方块,这儿因为轴比例变了导致变成长方形

Copy link
Collaborator

Choose a reason for hiding this comment

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

图片压缩一下,到 200 kb以内

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