-
Notifications
You must be signed in to change notification settings - Fork 765
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
【Hackathon 7th No.41】NO.41 为 Paddle 代码转换工具新增 API 转换规则(第 8 组) #6887
Changes from 3 commits
362d79c
0b1630e
c242c6b
ace0915
751a7de
4d1577b
64f6fea
c197639
3f2da7a
6401aef
ed7f684
8885daa
aac796d
7e3acf0
237cd1f
cefdf98
c6ea9fd
231f120
9eb1c74
cb9173a
96cf8ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## [torch 参数更多 ]torch.distributions.chi2.Chi2 | ||
|
||
### [torch.distributions.chi2.Chi2](https://pytorch.org/docs/stable/distributions.html#chi2) | ||
|
||
```python | ||
torch.distributions.chi2.Chi2(df, validate_args=None) | ||
``` | ||
|
||
### [paddle.distribution.Chi2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Chi2_cn.html#prob-value) | ||
|
||
```python | ||
paddle.distribution.Chi2(df) | ||
``` | ||
|
||
PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| -------------- | ------------ | ----------------------------------------------------------------------- | | ||
| df | df | 表示输入的参数。 | | ||
| validate_args | - | 是否添加验证环节。Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## [功能缺失 ]torch.distributions.constraints.Constraint | ||
|
||
### [torch.distributions.constraints.Constraint](https://pytorch.org/docs/stable/distributions.html#module-torch.distributions.constraints) | ||
|
||
```python | ||
torch.distributions.constraints.Constraint(is_discrete, event_dim) | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## [torch 参数更多 ]torch.distributions.gamma.Gamma | ||
|
||
### [torch.distributions.gamma.Gamma](https://pytorch.org/docs/stable/distributions.html#gamma) | ||
|
||
```python | ||
torch.distributions.gamma.Gamma(concentration, rate, validate_args=None) | ||
``` | ||
|
||
### [paddle.distribution.Gamma](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Gamma_cn.html) | ||
|
||
```python | ||
paddle.distribution.Gamma(concentration, rate) | ||
``` | ||
|
||
PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ----------------------------------------------------------------------- | | ||
| concentration | concentration | 表示输入的参数。 | | ||
| rate | rate | 表示输入的参数。 | | ||
| validate_args | - | 是否添加验证环节。Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## [torch 参数更多 ]torch.distributions.lkj_cholesky.LKJCholesky | ||
|
||
### [torch.distributions.lkj_cholesky.LKJCholesky](https://pytorch.org/docs/stable/distributions.html#torch.distributions.lkj_cholesky.LKJCholesky) | ||
|
||
```python | ||
torch.distributions.lkj_cholesky.LKJCholesky(dim, concentration=1.0, validate_args=None) | ||
``` | ||
|
||
### [paddle.distribution.LKJCholesky](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/LKJCholesky_cn.html) | ||
|
||
```python | ||
paddle.distribution.LKJCholesky(dim, concentration=1.0, sample_method='onion') | ||
``` | ||
|
||
PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------- | ----------------------------------------------------------------------- | | ||
| dim | dim | 表示输入的参数。 | | ||
| concentration | concentration | 表示输入的参数。 | | ||
| validate_args | - | 是否添加验证环节。Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | | ||
| - | sample_method | pytorch无此参数,保持默认即可。 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. paddle保持默认即可 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## [torch 参数更多 ]torch.distributions.poisson.Poisson | ||
|
||
### [torch.distributions.poisson.Poisson](https://pytorch.org/docs/stable/distributions.html#poisson) | ||
|
||
```python | ||
torch.distributions.poisson.Poisson(rate, validate_args=None) | ||
``` | ||
|
||
### [paddle.distribution.Poisson](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/Poisson_cn.html) | ||
|
||
```python | ||
paddle.distribution.Poisson(rate) | ||
``` | ||
|
||
PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------- | ----------------------------------------------------------------------- | | ||
| rate | rate | 表示输入的参数。 | | ||
| validate_args | - | 是否添加验证环节。Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## [torch 参数更多 ]torch.distributions.studentT.StudentT | ||
|
||
### [torch.distributions.studentT.StudentT](https://pytorch.org/docs/stable/distributions.html#studentt) | ||
|
||
```python | ||
torch.distributions.studentT.StudentT(df, loc=0.0, scale=1.0, validate_args=None) | ||
``` | ||
|
||
### [paddle.distribution.StudentT](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/StudentT_cn.html) | ||
|
||
```python | ||
paddle.distribution.StudentT(df, loc, scale, name=None) | ||
``` | ||
|
||
PyTorch 相比 Paddle 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------- | ----------------------------------------------------------------------- | | ||
| df | df | 表示输入的参数。 | | ||
| loc | loc | 表示输入的参数。 | | ||
| scale | scale | 表示输入的参数。 | | ||
| validate_args | - | 是否添加验证环节。Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## [ 功能缺失 ]torch.distributions.transforms.PositiveDefiniteTransform | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 好的好的,目前正在修改 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已经全都弄好了,请review |
||
|
||
### [torch.distributions.transforms.PositiveDefiniteTransform](https://pytorch.org/docs/stable/distributions.html#module-torch.distributions.transforms) | ||
|
||
```python | ||
torch.distributions.transforms.PositiveDefiniteTransform(cache_size=0) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不是功能缺失,仔细查阅paddle源码,以源代码为准