Skip to content

Conversation

@WoWYoYLoL
Copy link
Contributor

@WoWYoYLoL WoWYoYLoL commented Apr 9, 2024

PR Category

User Experience

PR Types

Docs

Description

  • 为reshape API 增加图例

对应的中文文档修复为:PaddlePaddle/docs#6569

… my-branch

add illustration for the reshape API && fix grammatical mistakes of the
indefinite article
@paddle-bot
Copy link

paddle-bot bot commented Apr 9, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Apr 9, 2024
@WoWYoYLoL WoWYoYLoL changed the title My branch add illustration for reshape API Apr 9, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 10, 2024
The following figure illustrates the first example -- a 3D tensor of shape [2, 4, 6] is transformed into a 2D tensor of shape [6, 8], during which the order and values of the elements in the tensor remain unchanged. The elements in the two subdiagrams correspond to each other, clearly demonstrating how the reshape API works.
![illustration of reshape API](https://github.com/PaddlePaddle/docs/blob/develop/docs/images/reshape.png?raw=true "illustration of reshape API")
Copy link
Contributor

Choose a reason for hiding this comment

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

这边不要用 markdown 格式的图片引用,否则无法渲染,可以看预览。和中文( PaddlePaddle/docs#6569 )一致即可,但引用路径需要改一下,因为仓库换了(docs -> Paddle)。

因为英文文档是通过抽取源码里的docstring,生产.rst 文件,所以和中文一样,得符合 sphinx 语法。

Args:
x (Tensor): An N-D Tensor. The data type is ``float16``, ``float32``, ``float64``, ``int16``, ``int32``, ``int64``, ``int8``, ``uint8``, ``complex64``, ``complex128``, ``bfloat16`` or ``bool``.
x (Tensor): A N-D Tensor. The data type is ``float16``, ``float32``, ``float64``, ``int16``, ``int32``, ``int64``, ``int8``, ``uint8``, ``complex64``, ``complex128``, ``bfloat16`` or ``bool``.
Copy link
Contributor

Choose a reason for hiding this comment

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

很细心,但 N-D Tensor 的发音以元音音素开始(即 N "en" 的发音),因此前面应该使用 an1-D Tensor也同理("one"的发音开始)

不过 Tensor 前面确实是跟着 a

Copy link
Contributor

@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

@sunzhongkai588 sunzhongkai588 merged commit 13caba9 into PaddlePaddle:develop Apr 25, 2024
runzhech pushed a commit to runzhech/Paddle that referenced this pull request Apr 30, 2024
* feat:add illustration for reshape API && fix:grammatical mistakes of the indefinite article

* bug fixes

* add illustration for reshape API

* Update python/paddle/tensor/manipulation.py

* add illustration for reshape API

* Update python/paddle/tensor/manipulation.py

---------

Co-authored-by: zachary sun <[email protected]>
runzhech pushed a commit to runzhech/Paddle that referenced this pull request Apr 30, 2024
* feat:add illustration for reshape API && fix:grammatical mistakes of the indefinite article

* bug fixes

* add illustration for reshape API

* Update python/paddle/tensor/manipulation.py

* add illustration for reshape API

* Update python/paddle/tensor/manipulation.py

---------

Co-authored-by: zachary sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants