Skip to content

Conversation

@xunyoyo
Copy link

@xunyoyo xunyoyo commented Jan 28, 2026

PR Category

Documentation

PR Types

Documentation

Description

  • Add fill_value alias note for paddle.Tensor.fill_diagonal_ in Tensor CN docs.
  • Update the PyTorch difference doc to reflect the alias support and keep extra args description.

Copilot AI review requested due to automatic review settings January 28, 2026 15:40
@paddle-bot
Copy link

paddle-bot bot commented Jan 28, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7703.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 that fill_value is an alias for value
  • Updated PyTorch difference documentation to reflect the alias support and clarify the extra parameters
  • Added a code example demonstrating the use of the fill_value alias

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 保持默认即可。 |
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缺少空格:中文逗号后面应该有一个空格。应将"PyTorch 无此参数, Paddle 保持默认即可。"修改为"PyTorch 无此参数,Paddle 保持默认即可。"(去掉逗号后多余的空格)。

Copilot generated this review using guidance from repository custom instructions.
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.

1 participant