Skip to content

【Hackathon 5th No.17】 为 Paddle 新增 pdist API - #660

Merged
luotao1 merged 14 commits into
PaddlePaddle:masterfrom
cocoshe:master
Oct 9, 2023
Merged

luotao1 merged 14 commits into
PaddlePaddle:masterfrom
cocoshe:master

Conversation

@cocoshe

@cocoshe cocoshe commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@paddle-bot

paddle-bot Bot commented Sep 26, 2023

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例和模版。
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

Comment thread rfcs/20230926_api_design_for_pdist.md Outdated

## 命名与参数设计

API的设计为paddle.cdist(x, y, p=2.0),其中 `x` 严格为 shape=[M, N] 的 Tensor,`p` 为p-范数对应的p值,输出为一行 `Mx(M-1)/2` 列的 Tensor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这里为啥变成了 cdist

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这里为啥变成了 cdist

typo,sry已修正,辛苦review~

@cocoshe cocoshe changed the title 【Hackathon 5th No.17】 为 Paddle 新增 pdist API 【Hackathon 5th No.17】 为 Paddle 新增 pdist API 和 bitwise_right_shift 系列 API Sep 27, 2023
@cocoshe cocoshe changed the title 【Hackathon 5th No.17】 为 Paddle 新增 pdist API 和 bitwise_right_shift 系列 API 【Hackathon 5th No.17】 为 Paddle 新增 pdist API Sep 27, 2023

## 3、意义

飞桨支持直接两两计算向量间的距离。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

不太通顺,建议修改一下

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已修改

飞桨支持计算大小为(NxM)的矩阵中,N个向量两两之间的p-norm距离。

@cocoshe

cocoshe commented Oct 7, 2023

Copy link
Copy Markdown
Contributor Author

已做相应修改,不知道还有没有什么问题,辛苦review~

@zxcd zxcd left a comment

Copy link
Copy Markdown
Collaborator

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 28f88ab into PaddlePaddle:master Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants