From d5139f0a4d7d214f4cbf6b35d5b27932f088aa77 Mon Sep 17 00:00:00 2001 From: YuRonan <471254751@qq.com> Date: Fri, 14 Oct 2022 15:07:16 +0800 Subject: [PATCH] Update 20220908_api_design_for_gumbel.md (#298) add cdf function for gumbel --- rfcs/APIs/20220908_api_design_for_gumbel.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rfcs/APIs/20220908_api_design_for_gumbel.md b/rfcs/APIs/20220908_api_design_for_gumbel.md index 647bde363..94f559e52 100644 --- a/rfcs/APIs/20220908_api_design_for_gumbel.md +++ b/rfcs/APIs/20220908_api_design_for_gumbel.md @@ -25,6 +25,7 @@ - `rsample` 重参数化采样; - `prob` 概率密度; - `log_prob`对数概率密度; +- `cdf`累积分布函数; - `entropy` 熵计算; ## 3、意义 @@ -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)