Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Zhang-Zhenkun
Copy link
Contributor

indices_or_sections必须分开使用,indices和sections均可作为位置参数或关键字参数使用,num_or_indices不可分开使用。

indices_or_sections必须分开使用,indices和sections均可作为位置参数或关键字参数使用,num_or_indices不可分开使用。
Copy link

paddle-bot bot commented Jun 29, 2024

感谢你贡献飞桨文档,文档预览构建中,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不可分开使用。 |
Copy link
Collaborator

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

@zhwesky2010
Copy link
Collaborator

这个是参数重载的方式,还是直接分两个API签名来写,第一个API签名是indices、第二个API签名是sections,你参考torch.max 的写法。

另外,修改comment直接在原分支上重新git push -f,不需要每次都关闭和重建RP。

这个分类应该算 仅参数名不一致

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants