fix doc in prob program

This commit is contained in:
Zichun Ye 2022-01-28 12:33:35 +08:00
parent f113b32459
commit 59c254d259
4 changed files with 48 additions and 3 deletions

View File

@ -13,8 +13,8 @@ mindspore.nn.probability.distribution.Gumbel
**参数:**
- **loc** (int, float, list, numpy.ndarray, Tensor) - Gumbel分布的位置。
- **scale** (int, float, list, numpy.ndarray, Tensor) - Gumbel分布的尺度。
- **loc** (int, float, list, numpy.ndarray, Tensor) - Gumbel分布的位置。默认值None。
- **scale** (int, float, list, numpy.ndarray, Tensor) - Gumbel分布的尺度。默认值None。
- **seed** (int) - 采样时使用的种子。如果为None则使用全局种子。默认值0。
- **dtype** (mindspore.dtype) - 分布类型。默认值mindspore.float32。
- **name** (str) - 分布的名称。默认值:'Gumbel'。

View File

@ -27,3 +27,21 @@ mindspore.nn.probability.distribution.Normal
- **ValueError** - `sd` 中元素小于0。
- **TypeError** - `dtype` 不是float的子类。
.. py:method:: mean
:property:
返回分布位置。
**返回:**
Tensor, 分布的期望。
.. py:method:: sd
:property:
返回分布比例。
**返回:**
Tensor, 分布的标准差。

View File

@ -21,3 +21,30 @@ mindspore.nn.probability.distribution.TransformedDistribution
- **TypeError** - bijector不是Bijector类。
- **TypeError** - distribution不是Distribution类。
.. py:method:: bijector
:property:
返回概率映射函数。
**返回:**
Bijector, 概率映射函数。
.. py:method:: distribution
:property:
返回变化前的概率分布。
**返回:**
Distribution, 变化前的概率分布。
.. py:method:: is_linear_transformation
:property:
返回概率映射函数是否为线性映射。
**返回:**
Bool, 概率映射函数为线性映射则返回True否则返回False。

View File

@ -487,7 +487,7 @@ class Distribution(Cell):
Args:
value (Tensor): value to be evaluated.
*args (list): the list of positional arguments forwarded to subclasses.
**kwargs (dict: the dictionary of keyword arguments forwarded to subclasses.
**kwargs (dict): the dictionary of keyword arguments forwarded to subclasses.
Note:
A distribution can be optionally passed to the function by passing its `dist_spec_args` through