-
Notifications
You must be signed in to change notification settings - Fork 752
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. 11 #5709
映射文档 No. 11 #5709
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5709.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@Tomoko-hjf |
@@ -0,0 +1,35 @@ | |||
## [ 仅参数名不一致 ]torch.Tensor.gcd.md |
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 参数更多
吧
@@ -0,0 +1,15 @@ | |||
## [ 仅参数名不一致 ]torch.all |
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.
这里改成 无参数
吧。
@@ -0,0 +1,33 @@ | |||
## [ 仅参数名不一致 ]torch.ge |
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 参数更多
吧
@@ -0,0 +1,33 @@ | |||
## [ 仅参数名不一致 ]torch.gt |
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 参数更多
吧
@@ -0,0 +1,33 @@ | |||
## [ 仅参数名不一致 ]torch.greater_equal |
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 参数更多
吧
@@ -0,0 +1,30 @@ | |||
## [ 仅参数名不一致 ]torch.histc |
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 参数更多
吧
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|-----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> out </font> | - | 表示输出的 Tensor,PaddlePaddle 无此参数,需要进行转写。 | |
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.
辛苦把 input ,bin min max 也补充一下~
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 输入的 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.
辛苦把 lambd 补充一下 ~
@@ -0,0 +1,36 @@ | |||
## [ 仅参数名不一致 ]torch.outer |
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 参数更多
吧
@@ -0,0 +1,33 @@ | |||
## [ 仅参数名不一致 ]torch.ge | |||
|
|||
### [torch.ge](https://pytorch.org/docs/1.13/generated/torch.ge.html#torch.ge) |
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.Tensor.ge 还是保持原来的吧,torch.ge也会实现一份(放在ops文件夹下),但是会由别的分组写。所以这 10个API 还是都放在 Tensor 文件夹下吧。剩下的也请修改一下~
@Tomoko-hjf fixed,可以再次review~ |
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.Tensor.xxx方法大都写成了paddle.xxx方法,可以参考已经合并的PR:#5733
如果在Tensor页面没有找到相应的api介绍,链接直接置为空即可
辛苦修改一下~
@@ -0,0 +1,35 @@ | |||
## [ torch 参数更多 ]torch.Tensor.gcd.md |
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.
.md
可以删去~
@@ -0,0 +1,35 @@ | |||
## [ torch 参数更多 ]torch.Tensor.gcd.md | |||
|
|||
同 torch.gcd |
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.Tensor.gcd(input, other, *, out=None) | ||
``` | ||
|
||
### [paddle.gcd(x, y, name=None)](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/gcd_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.
这个对应的应该是paddle.Tensor.gcd(y)吧,参考链接 https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#gcd-x-y-name-none,官网好像写错了,可以这样调用
import paddle
x1 = paddle.to_tensor(12)
x2 = paddle.to_tensor(20)
res = x1.gcd(x2)
### [paddle.greater_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/greater_equal_cn.html#greater-equal) | ||
|
||
```python | ||
paddle.greater_equal(x, y, 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.
这里可以调用 paddle.Tensor.greater_equal,参考链接 https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#greater-equal-y-name-none
这样分类就属于仅参数名不一致
,其他的也都需要修改一下~
torch.Tensor.gcd(other) | ||
``` | ||
|
||
### [paddle.Tensor.gcd(x, y, name=None)](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#gcd-x-y-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.
这里的标题可以去掉(x, y, name=None)
~
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.get_device.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.get_device.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.get_device.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.hardshrink.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.hardshrink.md
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.heaviside.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.md
Outdated
Show resolved
Hide resolved
@Tomoko-hjf 可以再次看看~ |
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.hardshrink.md
Show resolved
Hide resolved
@Tomoko-hjf 可以再次看看~ |
paddle.Tensor.histogram(bins=100, min=0, max=0, 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.
这里辛苦也补充一下参数映射部分,别的没什么问题了~
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.
done~
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.md
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.md
Outdated
Show resolved
Hide resolved
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
考虑部分函数为别名,对部分md文档的名称进行修改
#5691