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.18]为roll API 添加插图 #6810

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

haoyu2022
Copy link
Contributor

@haoyu2022 haoyu2022 commented Aug 4, 2024

PR Category

User Experience

PR Types

Docs

Description

  • 为roll API 增加图例

对应的英文文档修复为:PaddlePaddle/Paddle#67061

@FeixLiu @sunzhongkai588

Copy link

paddle-bot bot commented Aug 4, 2024

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

@@ -18,6 +18,12 @@ roll
- **axis** (int|list|tuple,可选) – 滚动轴。默认值为 None。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

下图展示了一个形状为 ``[[1,2,3],[4,5,6],[7,8,9]]`` 的二维张量通过 roll 操作转变为形状不同的张量。当全局滚动(无 `axis` 参数)时,张量会被展平成一维,然后进行循环滚动,再恢复原状;
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • 无 axis 参数 说法不准确,因为还有默认值。应该是 axis = None 时
  • 按行滚动(axis=0)时 其实也有点不准确,最好就说 沿着 axis = 0 ,因为行应该就只是矩阵的概念,像3d tensor 里就没有,直接说某个轴。按列滚动(axis=0)时 也是,建议这段话再改改

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,感谢

docs/images/api_legend/roll.png Outdated Show resolved Hide resolved
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 c82b47d into PaddlePaddle:develop Aug 30, 2024
2 checks passed
Aoraki-Dream pushed a commit to Aoraki-Dream/docs that referenced this pull request Sep 4, 2024
* Modify the roll API documentation

* fix document

* update

* update and  fix roll_cn.rst
@ooooo-create
Copy link
Collaborator

图片上的数字是不是打错了~,应该是 9 吧
1c3ff504125f48fe5fcd5a56c2b1220e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants