-
Notifications
You must be signed in to change notification settings - Fork 874
correct api difference format #7617
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
base: develop
Are you sure you want to change the base?
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7617.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
📚 本次 PR 文档预览链接(点击展开)
|
| | PyTorch | PaddlePaddle | 备注 | | ||
| | ------- | ------------ | ------------------------------------------------------------------------------------------ | | ||
| | optimizer | - | torch.optim.Optimizer 类,Paddle 无此参数。 | | ||
| | factor | values | PyTorch 表示乘以学习率的因子,Paddle 表示学习率列表。需要转写,转写思路为:values=[factor*optimizer.lr, optimizer.lr]。 | |
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.
这里的 需要转写 不用去掉
|
|
||
| ### 转写示例 | ||
| #### A 参数转写 | ||
| #### Pytorch A 参数和 Paddle 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.
这里标注 torch 的待转写参数即可
| ### 转写示例 | ||
| #### size_average | ||
| size_average 为 True | ||
| #### size_averagesize_average 为 True |
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.
这里改的格式不对,下面有size_average 为 True、size_average 为 False
|
|
||
| #### reduce | ||
| reduce 为 True | ||
| #### reducereduce 为 True |
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.
这里改的格式不对,下面有reduce为True,reduce为False
|
|
||
| #### reduction | ||
| reduction 为'none' | ||
| #### reductionreduction 为'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.
同上
|
|
||
| | PyTorch | PaddlePaddle | 备注 | | ||
| | ---------- | ------------ | -- | | ||
| | closure | - | 传入一个闭包函数,在优化器更新参数前执行。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.
这个应该是torch参数更多,删除原因是?
| | lstrip | lstrip | 是否移除左侧空白符。 | | ||
| | rstrip | rstrip | 是否移除左侧空白符。 | | ||
| | special | - | 是否有特殊的处理方式,Paddle 暂不支持该参数. | | ||
| | special | - | 是否有特殊的处理方式,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.
多了一个 .
| ### [torch.nn.Module.train](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.train) | ||
|
|
||
| ```python | ||
| torch.nn.Module.train(mode=True) |
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,138 @@ | |||
| import json | |||
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.
validate_api_difference与validate_api_difference_format两者的区别是?前者是一致性校验工具吗
| @@ -0,0 +1,138 @@ | |||
| import json | |||
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.
如果没问题了,这两个工具可以推到CI上了。
validate_pytorch_api_mapping与validate_api_difference,排除url检查。
No description provided.