Skip to content
New issue

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

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

Already on GitHub? # to your account

[Docathon][Add API Legend No.7] BUAA #6764

Closed
wants to merge 7 commits into from

Conversation

Caogration
Copy link

@Caogration Caogration commented Jul 18, 2024

Add image of expand and rewrite expand_cn.rst
中文文档链接:docs/api/paddle/expand_cn.rst
@DefTruth
@sunzhongkai588

Copy link

paddle-bot bot commented Jul 18, 2024

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6764.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jul 22, 2024
Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com>
@Caogration Caogration changed the title [Docathon][Add API Legend No.7] [Docathon][Add API Legend No.7] BUAA Jul 22, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

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

有几个点感觉可以优化下

  • 代表数值颜色的柱条可以去掉,对看文档的用户来说没有太大意义
  • 每个 axis 轴的刻度间隔都为 1 吧,不用包含小数,因为这是代表元素位置的,小数没有意义
  • 代表每个元素的圆点可以放大一些(或者用小方块代替),每个元素的数字用值来代替吧,因为这个不涉及元素位置的变化,用顺序没太大作用

图例尽量简洁直观些,包含必要的元素即可

Copy link
Author

Choose a reason for hiding this comment

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

Done

Caogration and others added 3 commits July 24, 2024 23:48
Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com>
@@ -9,6 +9,12 @@ expand

``x`` 的维数和 ``shape`` 的元素数应小于等于 6,并且 ``shape`` 中的元素数应该大于等于 ``x`` 的维数。扩展的维度的维度值应该为 1。

下图展示了一个 expand 的情形——一个形状为[1,2,3]的,值为[[1, 2, 5], [3, 0, 4]]的三维张量通过 expand 操作转变为形状为[2,2,3]的三维张量。通过比较,可以清晰地看到张量形状变化前后各元素的对应关系。
Copy link
Collaborator

Choose a reason for hiding this comment

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

[[1, 2, 5], [3, 0, 4]] 的形状好像是 [2,3] 而不是 [1,2,3]

Copy link
Collaborator

Choose a reason for hiding this comment

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

这图..也得改改

@Caogration Caogration closed this Aug 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
contributor HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants