-
Notifications
You must be signed in to change notification settings - Fork 724
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. 299/305/316/317/319 #6021
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6021.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@@ -0,0 +1,24 @@ | |||
## [仅参数名不一致]torch.cumulative_trapezoid | |||
|
|||
### [torch.cumulative_trapezoid](https://pytorch.org/docs/1.13/generated/torch.cumulative_trapezoid.html#torch.cumulative_trapezoid) |
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.
这个不要用1.13版本torch的API,要用最新版本torch的API
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,39 @@ | |||
## [torch 参数更多]torch.histogram | |||
|
|||
### [torch.histogram](https://pytorch.org/docs/1.13/generated/torch.histogram.html#torch.histogram) |
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.
这个不要用1.13版本torch的API,要用最新版本torch的API
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,36 @@ | |||
## [torch 参数更多]torch.special.i0 | |||
|
|||
### [torch.special.i0](https://pytorch.org/docs/1.13/special.html#torch.special.i0) |
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.
这个不要用1.13版本torch的API,要用最新版本torch的API
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.
已修改
| bins | bins | 直方图 bins(直条)的个数。 | | ||
| range | min, max | PyTorch 为 bins 的范围,类型为 float,Paddle 为 range 的下边界,上边界,类型为 int,需要进行转写。 | | ||
| weight | - | 权重,Paddle 无此参数,暂无转写方式。 | | ||
| density | - | 结果中每个 bin 是否包含权重数,Paddle 无此参数,暂无转写方式。 | |
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返回的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.
已修改
| range | min, max | PyTorch 为 bins 的范围,类型为 float,Paddle 为 range 的下边界,上边界,类型为 int,需要进行转写。 | | ||
| weight | - | 权重,Paddle 无此参数,暂无转写方式。 | | ||
| density | - | 结果中每个 bin 是否包含权重数,Paddle 无此参数,暂无转写方式。 | | ||
| 返回值 | 返回值 | PyTorch 返回 hist 和 bin_edges,Paddle 返回 hist,需要进行转写。 | |
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.
这个如果没办法计算出bin_edges,那应该是暂无转写方式,这个转写是指Pytorch代码如何转为paddle代码,也就是paddle怎么去适配pytorch的一个API调用,不能去改pytorch来适配paddle的
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.
已修改暂无转写方式
y = paddle.histogram(x, bins=5, min=0, max=3) | ||
``` | ||
|
||
#### 返回值 |
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的一次API调用如何转为paddle代码,也就是torch.histogram(x, bins=5, range=(0., 3.))
如何转写,不能去改动 待转写的Pytorch代码形式
这个如果没办法实现出bin_edges,就只能按功能缺失来了
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
PaddlePaddle/PaConvert#112
299 torch.cumulative_trapezoid
305 torch.special.i1
316 torch.special.i1e
317 torch.special.i0
319 torch.histogram