mindspore.ops.StandardNormal
- class mindspore.ops.StandardNormal(seed=0, seed2=0)[源代码]
根据标准正态(高斯)随机数分布生成随机数。
更多参考详见
mindspore.ops.standard_normal()
。- 支持平台:
Ascend
GPU
CPU
样例:
>>> from mindspore import ops >>> shape = (3, 4) >>> stdnormal = ops.StandardNormal(seed=2) >>> output = stdnormal(shape) >>> print(output) [[-1.3031056 0.64198005 -0.65207404 -1.767485 ] [-0.91792876 0.6508565 -0.9098478 -0.14092612] [ 0.7806437 1.1585592 1.9676613 -0.00440959]]