Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix docs #6993

Merged
merged 19 commits into from
Nov 26, 2024
Merged

Fix docs #6993

merged 19 commits into from
Nov 26, 2024

Conversation

Xuxuanang
Copy link
Contributor

torch.Tensor.ormqr
torch.distributed.all_gather_object
torch.nn.GRUCell
torch.nn.LSTMCell
torch.nn.RNNCell

Copy link

paddle-bot bot commented Nov 25, 2024

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

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

有些文档看起来之前就已经改了,拉一下最新的合并下吧

@zhwesky2010
Copy link
Collaborator

@Xuxuanang

push了但是看comment一个都没改

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

下个PR改下

@@ -10,14 +10,14 @@ torch.nn.GRUCell(input_size, hidden_size, bias=True, device=None, dtype=None)
paddle.nn.GRUCell(input_size, hidden_size, weight_ih_attr=None, weight_hh_attr=None, bias_ih_attr=None, bias_hh_attr=None, name=None)
```

两者功能一致但参数不一,具体如下:
两者功能一致但输入参数用法不一致,且返回参数类型不同,具体如下:
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个其实是返回参数个数,下一个PR可以再微调下

```
#### forward 类方法:前向传播
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个加一下注释,说明下paddle返回个数的不同

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input_size | input_size | 表示输入 x 的大小。 |
| hidden_size | hidden_size | 表示隐藏状态 h 大小。 |
| bias | bias_ih_attr, bias_hh_attr | 是否使用偏置, Paddle 支持自定义偏置属性, torch 不支持,需要转写。 |
| bias | bias_ih_attr, bias_hh_attr | 是否使用偏置,Paddle 的 bias_ih_attr, bias_hh_attr 参数均需与 PyTorch 设置一致,需要转写。 |
| device | - | 指定 Tensor 的设备,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
| dtype | - | Tensor 的所需数据类型,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
| - |weight_ih_attr| weight_ih 的参数, PyTorch 无此参数, Paddle 保持默认即可。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

加一行:返回值

@@ -9,14 +9,14 @@ torch.nn.LSTMCell(input_size, hidden_size, bias=True, device=None, dtype=None)
paddle.nn.LSTMCell(input_size, hidden_size, weight_ih_attr=None, weight_hh_attr=None, bias_ih_attr=None, bias_hh_attr=None, proj_size=0, name=None)
```

两者功能一致但参数不一,具体如下:
两者功能一致但输入参数用法不一致,且返回参数类型不同,具体如下:
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input_size | input_size | 表示输入 x 的大小。 |
| hidden_size | hidden_size | 表示隐藏状态 h 大小。 |
| bias | bias_ih_attr, bias_hh_attr | 是否使用偏置, Paddle 支持自定义偏置属性, torch 不支持,需要转写。 |
| bias | bias_ih_attr, bias_hh_attr | 是否使用偏置, Paddle 的 bias_ih_attr, bias_hh_attr 参数均需与 PyTorch 设置一致,需要转写。 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

@zhwesky2010 zhwesky2010 merged commit d42c51e into PaddlePaddle:develop Nov 26, 2024
2 checks passed
WSBG pushed a commit to WSBG/docs that referenced this pull request Nov 27, 2024
* fix-docs

* fix pi

* fix pi

* fix docs

* fix docs

* fix docs

* fix bugs

* fix docs

* fix docs

* fix docs

* fix-docs

* fix docs

* fix tools

* resolve conflict

* resolve conflict

* resubmit

* resubmit

* fix docs
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants