manual_seed
- paddle.cuda. manual_seed ( seed: int ) None [source]
-
Set the seed for generating random numbers for the current Device.
Warning
If you are working with a multi-Device model, this function is insufficient to get determinism. To seed all Devices, use
manual_seed_all().Sets the seed for global default generator, which manages the random number generation.
- Parameters
-
seed (int) – The random seed to set.
- Returns
-
None
Examples
>>> import paddle >>> paddle.device.manual_seed(102) >>> # paddle.cuda.manual_seed(102) is equivalent to paddle.device.manual_seed(102) >>> paddle.cuda.manual_seed(102)
