-
Notifications
You must be signed in to change notification settings - Fork 758
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 #6967
base: develop
Are you sure you want to change the base?
Conversation
unique-consecutive-kineast
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6967.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是多余的?
There was a problem hiding this comment.
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是列
- **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 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些空格不需要增加
将 Tensor 中连续重复的元素进行去重,返回连续不重复的 Tensor 。 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么加了空行
上图展示了一个一维张量的去重过程 | ||
下图展示了一个 [3, 4] 的二维张量沿 axis = 0 展开后去重再进行二维折叠的过程 | ||
|
||
.. figure:: ../../images/api_legend/unique-consecutive.png | ||
:width: 500 | ||
:alt: 示例二图示 | ||
:align: center |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
图例部分加在 参数 板块上面,即API介绍的那部分
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.unique_consecutive | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同理,为什么加了这么多空行
These 2 samples are uploaded.