SharedNoiseTable¶
-
class
maze.train.trainers.es.es_shared_noise_table.
SharedNoiseTable
(count: int = 250000000)¶ A fixed length vector of deterministically generated pseudo-random floats.
This enables a communication strategy for the distributed training, that allows to transfer noise table indices instead of full gradient vectors.
- Parameters
count – Number of float values in the fixed length table (250.000.000 x 32bit floats = 1GB)
-
get
(i: int, dim: int) → numpy.ndarray¶ Get the pseudo-random sequence at table index i.
- Parameters
i – start index within the table
dim – desired vector length
:return A noise vector with length dim
-
sample_index
(rng: numpy.random.RandomState) → int¶ Sample a random index within the table, taking into account the size of the noise vector.
- Parameters
rng – Maze random number generator to be used.
- Returns
A noise index to be passed to
maze.train.trainers.es.es_shared_noise_table.SharedNoiseTable.get()
.