mindspore/docs/api/api_python/ops/mindspore.ops.func_gamma.rst

20 lines
529 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.gamma
====================
.. py:function:: mindspore.ops.gamma(shape, alpha, beta, seed=None)
根据伽马分布生成随机数。
支持广播。
.. warning::
Ascend后端不支持随机数重现功能 `seed` 参数不起作用。
参数:
- **shape** (tuple) - 指定shape。
- **alpha** (Tensor) - shape参数。
- **beta** (Tensor) - 逆尺度参数。
- **seed** (int可选) - 随机种子,默认 ``None``
返回:
Tensor