-
Notifications
You must be signed in to change notification settings - Fork 756
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 torch.tensor_split.md #6732
base: develop
Are you sure you want to change the base?
Conversation
indices_or_sections必须分开使用,indices和sections均可作为位置参数或关键字参数使用,num_or_indices不可分开使用。
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6732.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor ,仅参数名不一致。 | | ||
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 | | ||
| indices_or_sections | num_or_indices | indices_or_sections必须分开使用,indices和sections均可作为位置参数或关键字参数使用,num_or_indices不可分开使用。 | |
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.max的写法:
https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.max.md
这个是参数重载的方式,还是直接分两个API签名来写,第一个API签名是indices、第二个API签名是sections,你参考torch.max 的写法。 另外,修改comment直接在原分支上重新git push -f,不需要每次都关闭和重建RP。 这个分类应该算 仅参数名不一致 |
|
indices_or_sections必须分开使用,indices和sections均可作为位置参数或关键字参数使用,num_or_indices不可分开使用。