megengine.random.RNG.normal¶
- RNG.normal(mean=0, std=1, size=None)[源代码]¶
Random variable with Gaussian distribution \(N(\mu, \sigma)\).
- 参数
- 返回
the output tensor.
实际案例
import megengine as mge import megengine.random as rand x = rand.normal(mean=0, std=1, size=(2, 2)) print(x.numpy())
Outputs:
[[-1.4010863 -0.9874344 ] [ 0.56373274 0.79656655]]