-
Notifications
You must be signed in to change notification settings - Fork 762
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
映射文档 No.44 #5827
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5827.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
你好,我对分组ID 44(#5691)中的9个api进行了映射,其中torch.kthvalue已经存在,我就没有进行改动了。 |
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.
有两个公共的小问题,辛苦修改一下~
- 备注完善一下,参数名不一致的加一句
仅参数名不一致。
- out的转写用 paddle.assign实现
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。| |
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.
辛苦备注加一句 仅参数名不一致。
~
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。| | ||
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 | |
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.
备注加一句 仅参数名不一致。
torch.fmax([3, 5], 1., out=y) | ||
|
||
# Paddle 写法 | ||
y = paddle.fmax([3, 5], 1.) |
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.
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。| | ||
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 | |
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.
备注加一句 仅参数名不一致。
torch.fmin([3, 5], 1., out=y) | ||
|
||
# Paddle 写法 | ||
y = paddle.fmin([3, 5], 1.) |
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.
转写应该为 paddle.assign(paddle.fmin([3, 5], 1.), y)
torch.greater([3, 5], 1., out=y) | ||
|
||
# Paddle 写法 | ||
y = paddle.greater_than([3, 5], 1.) |
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.
转写方式
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 | | ||
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 | |
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.
备注完善一下~
torch.le([3, 5], 1., out=y) | ||
|
||
# Paddle 写法 | ||
y = paddle.less_equal([3, 5], 1.) |
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.
转写修改一下~
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 | | ||
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 | |
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.
备注完善一下~
torch.less([3, 5], 1., out=y) | ||
|
||
# Paddle 写法 | ||
y = paddle.less_than([3, 5], 1.) |
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.
不好意思,我重新按照要求完善了备注和改写方式,感谢
不好意思,我重新按照要求完善了备注和改写方式,麻烦了 |
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.
LGTM
CI 没有过,需要按照官网安装一下pre-commit,https://www.paddlepaddle.org.cn/documentation/docs/zh/dev_guides/code_contributing_path_cn.html |
你好,我按照官网安装了pre-commit并重新提交了,也按照官网要求完善了简化了参数备注 |
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.
LGTM
@@ -0,0 +1,32 @@ | |||
## [torch 参数更多 ]torch.maximum |
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.
maximum/minimum应该已经有了
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.
好的,那是需要删除后再提交还是选择直接合并呢?
你好,maximum/minimum这两个我在映射时还没有,请问现在需要我怎么处理? |
你好,确认了一下这两个文件目前还没有,继续保留就可以,我们会进行merge~ |
好的,麻烦了 |
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.greater([3, 5], 1., out=y) |
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.
换一个两个shape一致的吧,目前paddle还不支持第二个参数为scalar
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.less([3, 5], 1., out=y) |
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.
换成shape为一致的case
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.less_equal([3, 5], 1., out=y) |
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.
换成shape为一致的case
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.lt([3, 5], 1., out=y) |
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.
换成shape为一致的case
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.maximum([3, 5], 1., out=y) |
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.
换成shape为一致的case
#### out:指定输出 | ||
```python | ||
# Pytorch 写法 | ||
torch.minimum([3, 5], 1., out=y) |
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.
换成shape为一致的case
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.
LGTM
hi, @TzssZ
|
分组 ID 44
#5691