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

18 lines
801 B
ReStructuredText
Raw 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.normal
====================
.. py:class:: mindspore.ops.normal(shape, mean, stddev, seed=None)
根据正态(高斯)随机数分布生成随机数。
**参数:**
- **shape** (tuple) - Tuple: :math:`(N,*)` ,其中 :math:`*` 表示任何数量的附加维度。
- **mean** (Tensor) - 均值μ,指定分布的峰值,数据类型支持[int8, int16, int32, int64, float16, float32]。
- **stddev** (Tensor) - 标准差σ。大于0。数据类型支持[int8, int16, int32, int64, float16, float32]。
- **seed** (int) - 随机种子。取值须为非负数。默认值None等同于0。
**返回:**
Tensorshape应与输入 `shape``mean``stddev` 进行广播之后的shape相同。数据类型支持float32。