-
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
Update API convert #5723
Update API convert #5723
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5723.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
@@ -1,4 +1,4 @@ | |||
## torch.nn.functional.cross_entropy | |||
## [ 参数用法不一致 ]torch.nn.functional.cross_entropy |
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_api_mapping.md保持一致
@@ -1,4 +1,4 @@ | |||
## torch.nn.functional.elu_ | |||
## [] 仅参数名不一致 torch.nn.functional.elu_ |
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,4 +1,4 @@ | |||
## torch.nn.functional.one_hot | |||
## [ 参数用法不一致 ]torch.nn.functional.one_hot |
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类统一在这5种选吧,可以补充到任务描述里:无参数、参数完全一致、仅参数名不一致、仅paddle参数更多、仅参数默认值不一致
这个是最后一种
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| return_indices| return_mask | 如果设置为 True,则会与输出一起返回最大值的索引,默认为 False。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| return_indices | return_mask | 如果设置为 True,则会与输出一起返回最大值的索引,默认为 False。 | |
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 | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| return_indices| return_mask | 如果设置为 True,则会与输出一起返回最大值的索引,默认为 False。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| return_indices | return_mask | 如果设置为 True,则会与输出一起返回最大值的索引,默认为 False。 | |
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 | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| parameters | - | 表示要操作的 Tensor,Pytorch 属于原位操作,PaddlePaddle 无此参数,需要实例化之后在 optimizer 中设置才可以使用。 | | ||
| clip_value | - | 表示裁剪梯度的范围,范围为 $[-clip_value, clip_vale]$,PaddlePaddle 的 max 参数可对应实现该参数功能。 | | ||
| clip_value | max | 表示裁剪梯度的范围,范围为 $[-clip_value, clip_vale]$,PaddlePaddle 的 max 参数可对应实现该参数功能。 | | ||
| - | max | 表示裁剪梯度的最大值,PyTorch 无此参数,Paddle 设置值与 torch 的 clip_value 参数保持一致。 | |
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,4 +1,4 @@ | |||
## torch.nn.utils.remove_weight_norm | |||
## [ 参数名不一致 ]torch.nn.utils.remove_weight_norm |
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,4 +1,4 @@ | |||
## torch.nn.utils.spectral_norm | |||
## [ 参数名不一致 ]torch.nn.utils.spectral_norm |
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,4 +1,4 @@ | |||
## torch.utils.data.BatchSampler | |||
## [paddle 参数更多 ]torch.utils.data.BatchSampler |
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,4 +1,4 @@ | |||
## torch.nn.utils.weight_norm | |||
## [ 参数名不一致 ]torch.nn.utils.weight_norm |
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.
先合入了,1个comment可以后面再改
@@ -17,7 +17,7 @@ torch.nn.Linear(in_features, | |||
name=None) | |||
``` | |||
|
|||
其中 Pytorch 的 bias 与 Paddle 的 bias_attr 用法不一致,具体如下: | |||
其中 Pytorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致, Paddle 的 `bias_attr` 仅支持 `False`,具体如下: |
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.
这句内容,在下面表格,对应到某个参数里去描述
Update API convert