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

映射文档 No. 193/194/195 #6025

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## [torch 参数更多]torch.distributions.transforms.SoftmaxTransform

### [torch.distributions.transforms.SoftmaxTransform](https://pytorch.org/docs/1.13/distributions.html#torch.distributions.transforms.SoftmaxTransform)

```python
torch.distributions.transforms.SoftmaxTransform(cache_size=0)
```

### [paddle.distribution.SoftmaxTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/SoftmaxTransform_cn.html)

```python
paddle.distribution.SoftmaxTransform()
```

其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ---------- | ------------ | -------------------------------------------------------------------------- |
| cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
Copy link
Contributor

Choose a reason for hiding this comment

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

补一下转写示例

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## [torch 参数更多]torch.distributions.transforms.StackTransform

### [torch.distributions.transforms.StackTransform](https://pytorch.org/docs/1.13/distributions.html#torch.distributions.transforms.StackTransform)

```python
torch.distributions.transforms.StackTransform(tseq, dim=0, cache_size=0)
```

### [paddle.distribution.StackTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/StackTransform_cn.html)

```python
paddle.distribution.StackTransform(transforms, axis=0)
```

其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ---------- | ------------ | -------------------------------------------------------------------------- |
| tseq | transforms | 输入的变换序列,仅参数名不一致。 |
| dim | axis | 待变换的轴,仅参数名不一致。 |
| cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
Copy link
Contributor

Choose a reason for hiding this comment

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

补一下转写示例

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## [torch 参数更多]torch.distributions.transforms.StickBreakingTransform

### [torch.distributions.transforms.StickBreakingTransform](https://pytorch.org/docs/1.13/distributions.html#torch.distributions.transforms.StickBreakingTransform)

```python
torch.distributions.transforms.StickBreakingTransform(cache_size=0)
```

### [paddle.distribution.StickBreakingTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/StickBreakingTransform_cn.html)

```python
paddle.distribution.StickBreakingTransform()
```

其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ---------- | ------------ | -------------------------------------------------------------------------- |
| cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |
Copy link
Contributor

Choose a reason for hiding this comment

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

补一下转写示例

Copy link
Contributor Author

Choose a reason for hiding this comment

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