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.39]add the picture of unique-consecutive -part #6967

Merged
merged 17 commits into from
Dec 11, 2024

Conversation

kineast
Copy link
Contributor

@kineast kineast commented Nov 14, 2024

These 2 samples are uploaded.

Copy link

paddle-bot bot commented Nov 14, 2024

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

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2024

CLA assistant check
All committers have signed the CLA.

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Nov 14, 2024
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
Contributor Author

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.

  • sample1 的图例感觉反而弄复杂了更难理解了,比如 input_position 和 output_position 不知道用处在哪。尽量从开发者的角度来设计图例,尽量保持简洁明了
  • sample2 的 axis 弄反了, aixs=0是行,axis=1是列

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

Comment on lines 14 to 19
- **x** (Tensor) - 输入的 `Tensor` ,数据类型为: float32、float64、int32、int64。
- **return_inverse** (bool ,可选 ) - 如果为 True ,则还返回输入 Tensor 的元素对应在连续不重复元素中的索引,该索引可用于重构输入 Tensor 。默认: False。
- **return_counts** (bool ,可选 ) - 如果为 True ,则还返回每个连续不重复元素在输入 Tensor 中的个数。默认: False
- **axis** (int ,可选 ) - 指定选取连续不重复元素的轴。默认值为 None ,将输入平铺为 1-D 的 Tensor 后再选取连续不重复元素。默认: None
- **dtype** (np.dtype|str ,可选 ) - 用于设置 `inverse` 或者 `counts` 的类型,应该为 int32 或者 int64 。默认: int64
- **name** (str ,可选 ) - 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为 None
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
Contributor Author

Choose a reason for hiding this comment

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

已修改

Comment on lines +8 to +9
将 Tensor 中连续重复的元素进行去重,返回连续不重复的 Tensor 。

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
Contributor Author

Choose a reason for hiding this comment

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

已删除

Comment on lines 29 to 35
上图展示了一个一维张量的去重过程
下图展示了一个 [3, 4] 的二维张量沿 axis = 0 展开后去重再进行二维折叠的过程

.. figure:: ../../images/api_legend/unique-consecutive.png
:width: 500
:alt: 示例二图示
:align: center
Copy link
Collaborator

Choose a reason for hiding this comment

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

图例部分加在 参数 板块上面,即API介绍的那部分

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改


代码示例
::::::::::::

COPY-FROM: paddle.unique_consecutive

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
Contributor Author

Choose a reason for hiding this comment

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

已删除

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 changed the title [SCU][Docathon][Add API Legend No.39]add the picture of unique-consecutive [SCU][Docathon][Add API Legend No.39]add the picture of unique-consecutive -part Dec 11, 2024
@luotao1 luotao1 merged commit 7c30647 into PaddlePaddle:develop Dec 11, 2024
2 checks passed
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