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

映射文档 No.44 #5827

Merged
merged 5 commits into from
May 12, 2023
Merged

映射文档 No.44 #5827

merged 5 commits into from
May 12, 2023

Conversation

TzssZ
Copy link
Contributor

@TzssZ TzssZ commented Apr 24, 2023

分组 ID 44

#5691

@paddle-bot
Copy link

paddle-bot bot commented Apr 24, 2023

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

@TzssZ TzssZ changed the title [work in process]映射文档 No.44 映射文档 No.44 Apr 24, 2023
@TzssZ
Copy link
Contributor Author

TzssZ commented Apr 24, 2023

你好,我对分组ID 44(#5691)中的9个api进行了映射,其中torch.kthvalue已经存在,我就没有进行改动了。

Copy link
Collaborator

@huajiao-hjyp huajiao-hjyp left a comment

Choose a reason for hiding this comment

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

有两个公共的小问题,辛苦修改一下~

  • 备注完善一下,参数名不一致的加一句仅参数名不一致。
  • out的转写用 paddle.assign实现

### 参数映射
| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。|
Copy link
Collaborator

Choose a reason for hiding this comment

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

辛苦备注加一句 仅参数名不一致。 ~

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。|
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

备注加一句 仅参数名不一致。

torch.fmax([3, 5], 1., out=y)

# Paddle 写法
y = paddle.fmax([3, 5], 1.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。|
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

备注加一句 仅参数名不一致。

torch.fmin([3, 5], 1., out=y)

# Paddle 写法
y = paddle.fmin([3, 5], 1.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

转写应该为 paddle.assign(paddle.fmin([3, 5], 1.), y)

torch.greater([3, 5], 1., out=y)

# Paddle 写法
y = paddle.greater_than([3, 5], 1.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

转写方式

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

备注完善一下~

torch.le([3, 5], 1., out=y)

# Paddle 写法
y = paddle.less_equal([3, 5], 1.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

转写修改一下~

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

备注完善一下~

torch.less([3, 5], 1., out=y)

# Paddle 写法
y = paddle.less_than([3, 5], 1.)
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.

不好意思,我重新按照要求完善了备注和改写方式,感谢

@TzssZ
Copy link
Contributor Author

TzssZ commented Apr 24, 2023

不好意思,我重新按照要求完善了备注和改写方式,麻烦了

Copy link
Collaborator

@huajiao-hjyp huajiao-hjyp left a comment

Choose a reason for hiding this comment

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

LGTM

@huajiao-hjyp
Copy link
Collaborator

CI 没有过,需要按照官网安装一下pre-commit,https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/code_contributing_path_cn.html

@TzssZ
Copy link
Contributor Author

TzssZ commented Apr 24, 2023

你好,我按照官网安装了pre-commit并重新提交了,也按照官网要求完善了简化了参数备注

Copy link
Collaborator

@huajiao-hjyp huajiao-hjyp left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -0,0 +1,32 @@
## [torch 参数更多 ]torch.maximum
Copy link
Collaborator

Choose a reason for hiding this comment

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

maximum/minimum应该已经有了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,那是需要删除后再提交还是选择直接合并呢?

@TzssZ
Copy link
Contributor Author

TzssZ commented May 1, 2023

你好,maximum/minimum这两个我在映射时还没有,请问现在需要我怎么处理?

@huajiao-hjyp
Copy link
Collaborator

你好,maximum/minimum这两个我在映射时还没有,请问现在需要我怎么处理?

你好,确认了一下这两个文件目前还没有,继续保留就可以,我们会进行merge~

@TzssZ
Copy link
Contributor Author

TzssZ commented May 3, 2023

好的,麻烦了

#### out:指定输出
```python
# Pytorch 写法
torch.greater([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换一个两个shape一致的吧,目前paddle还不支持第二个参数为scalar

#### out:指定输出
```python
# Pytorch 写法
torch.less([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换成shape为一致的case

#### out:指定输出
```python
# Pytorch 写法
torch.less_equal([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换成shape为一致的case

#### out:指定输出
```python
# Pytorch 写法
torch.lt([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换成shape为一致的case

#### out:指定输出
```python
# Pytorch 写法
torch.maximum([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换成shape为一致的case

#### out:指定输出
```python
# Pytorch 写法
torch.minimum([3, 5], 1., out=y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

换成shape为一致的case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

你好,我已按照要求修改相关问题了

@TzssZ
Copy link
Contributor Author

TzssZ commented May 9, 2023

你好,我已按照要求修改相关问题了

@TzssZ
Copy link
Contributor Author

TzssZ commented May 9, 2023

@zhwesky2010

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 0e63fa0 into PaddlePaddle:develop May 12, 2023
@luotao1
Copy link
Collaborator

luotao1 commented May 16, 2023

hi, @TzssZ

  • 非常感谢你对飞桨框架的贡献,我们正在运营一个PFCC组织,会通过定期分享技术知识与发布开发者主导任务的形式持续为飞桨框架做贡献,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 ext_paddle_oss@baidu.com,我们会邀请你加入~

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants