[API Compatibility No.350] Update fill_diagonal_ alias docs#7703
Open
xunyoyo wants to merge 2 commits intoPaddlePaddle:developfrom
Open
[API Compatibility No.350] Update fill_diagonal_ alias docs#7703xunyoyo wants to merge 2 commits intoPaddlePaddle:developfrom
xunyoyo wants to merge 2 commits intoPaddlePaddle:developfrom
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7703.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents the parameter alias support for paddle.Tensor.fill_diagonal_ method, specifically adding documentation that fill_value can be used as an alias for the value parameter.
Changes:
- Added alias note in the Chinese API documentation (
Tensor__upper_cn.rst) indicating thatfill_valueis an alias forvalue - Updated PyTorch difference documentation to reflect the alias support and clarify the extra parameters
- Added a code example demonstrating the use of the
fill_valuealias
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md |
Updated PyTorch compatibility documentation to mention fill_value alias support and added name parameter description |
docs/api/paddle/Tensor__upper_cn.rst |
Added alias documentation for value parameter and included example demonstrating fill_value usage |
| | ---------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | | ||
| | fill_value | value | 以输入 value 值修改原始 Tensor 对角线元素,仅参数名不一致。 | | ||
| | fill_value | value | Paddle 支持 ``fill_value`` 作为 ``value`` 的别名。 | | ||
| | - | offset | 所选取对角线相对原始主对角线位置的偏移量,正向右上方偏移,负向左下方偏移,默认为 0。PyTorch 无此参数, Paddle 保持默认即可。 | |
There was a problem hiding this comment.
缺少空格:中文逗号后面应该有一个空格。应将"PyTorch 无此参数, Paddle 保持默认即可。"修改为"PyTorch 无此参数,Paddle 保持默认即可。"(去掉逗号后多余的空格)。
Collaborator
|
@xunyoyo 放一下Paddle修改的PR链接 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Documentation
PR Types
Documentation
Description
fill_valuealias note forpaddle.Tensor.fill_diagonal_in Tensor CN docs.