megengine.random.seed

seed(seed)[源代码]

Sets the seed for generating random numbers globally.

参数

seed (int) – the number to be set for generating random numbers.

返回

None.

实际案例

>>> import megengine.random as rand
>>> rand.seed(0)