Skip to content

Commit

Permalink
Update 20220908_api_design_for_gumbel.md (#298)
Browse files Browse the repository at this point in the history
add cdf function for gumbel
  • Loading branch information
PureNatural authored Oct 14, 2022
1 parent 3f71c4a commit d5139f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rfcs/APIs/20220908_api_design_for_gumbel.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- `rsample` 重参数化采样;
- `prob` 概率密度;
- `log_prob`对数概率密度;
- `cdf`累积分布函数;
- `entropy` 熵计算;

## 3、意义
Expand Down Expand Up @@ -533,6 +534,11 @@ exp(-(value - self.loc) / self.scale - exp(-(value - self.loc) / self.scale)) /
np.log(self.probs(value))
```

- cdf(value):累积分布函数
```python
paddle.exp(-paddle.exp(-(value - self.loc) / self.scale))
```

- entropy(scale):熵
```python
self.scale.log() + (1 + np.euler_gamma)
Expand Down

0 comments on commit d5139f0

Please sign in to comment.