megengine.random.seed

seed(seed)[source]

Sets the seed for generating random numbers globally.

Parameters

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

Returns

None.

Examples

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