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

[SCU][Docathon][Add API Legend No.7] expand -part #6978

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

yangrongxinuser
Copy link
Contributor

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

Copy link

paddle-bot bot commented Nov 18, 2024

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

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Nov 18, 2024
@luotao1 luotao1 changed the title [SCU][Docathon][Add API Legend No.7] [SCU][Docathon][Add API Legend No.7] expand Nov 19, 2024
Comment on lines 12 to 16

Original Tensor显示了一个形状为 [3]的一维张量[1, 2, 3]。
通过 tensor.expand((2, 3))方法被广播扩展为一个形状为[2, 3]的二维张量。
其中每一行均为原张量的值。expand的结果在右侧图中展示。

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
Original Tensor显示了一个形状为 [3]的一维张量[1, 2, 3]。
通过 tensor.expand((2, 3))方法被广播扩展为一个形状为[2, 3]的二维张量。
其中每一行均为原张量的值。expand的结果在右侧图中展示。
**示例图解说明**:
Original Tensor 显示了一个形状为 [3] 的一维张量 [1, 2, 3]。通过 paddle.expand 方法(参数 ``shape = [2, 3]``)被广播扩展为一个形状为 [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.

再加一下图片的引用

Copy link
Collaborator

Choose a reason for hiding this comment

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

拓展后的2d tensor以一个矩阵的形式展现

@yangrongxinuser
Copy link
Contributor Author

@sunzhongkai588 ,辛苦老师看看还有什么问题

Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM,英文文档也加一下

@luotao1 luotao1 merged commit cca7705 into PaddlePaddle:develop Dec 11, 2024
2 checks passed
@luotao1 luotao1 changed the title [SCU][Docathon][Add API Legend No.7] expand [SCU][Docathon][Add API Legend No.7] expand -part Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants