You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.nn.probability.distribution.Exponential.rst 1.3 kB

4 years ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. mindspore.nn.probability.distribution.Exponential
  2. ===================================================
  3. .. py:class:: mindspore.nn.probability.distribution.Exponential(rate=None, seed=None, dtype=mstype.float32, name='Exponential')
  4. 指数分布(Exponential Distribution)。
  5. 连续随机分布,取值范围为所有实数,概率密度函数为
  6. .. math::
  7. f(x, \lambda) = \lambda \exp(-\lambda x).
  8. 其中 :math:`\lambda` 为分别为指数分布的率参数。
  9. **参数:**
  10. - **rate** (int, float, list, numpy.ndarray, Tensor) - 率参数。默认值:None。
  11. - **seed** (int) - 采样时使用的种子。如果为None,则使用全局种子。默认值:None。
  12. - **dtype** (mindspore.dtype) - 事件样例的类型。默认值:mindspore.float32。
  13. - **name** (str) - 分布的名称。默认值:'Exponential'。
  14. .. note::
  15. - `rate` 中的元素必须大于0。
  16. - `dtype` 必须是float,因为指数分布是连续的。
  17. **异常:**
  18. - **ValueError** - `rate` 中元素小于0。
  19. - **TypeError** - `dtype` 不是float的子类。
  20. .. py:method:: rate
  21. :property:
  22. 返回 `rate` 。
  23. **返回:**
  24. Tensor, rate 的值。