class MXNet::Random
- MXNet::Random
- Reference
- Object
Overview
Random number interface of MXNet.
Defined in:
mxnet/random.crClass Method Summary
-
.seed(seed_state : Int32, ctx : Context | ::Symbol = :all)
Seeds the random number generators in MXNet.
Class Method Detail
Seeds the random number generators in MXNet.
This affects the behavior of modules in MXNet that use random
number generators, like the dropout operator and the NDArray
random sampling operators.
Parameters
- seed_state (
Int32) The random number seed. - ctx (
Contextor:allfor all devices, default:all) The device context of the generator. The default is:allwhich means seeding random number generators of all devices.
Notes
Random number generators in MXNet are device specific.
.seed(seed_state) sets the state of each generator using
seed_state and the device id. Therefore, random numbers
generated from different devices can be different even if they
are seeded using the same seed.