|View source on GitHub|
Gaussian noise generator with counter as pseudo state.
tf_privacy.tree_aggregation.GaussianNoiseGenerator( noise_std: float, specs: Collection[tf.TensorSpec], seed: Optional[int] = None )
Produces i.i.d. spherical Gaussian noise at each step shaped according to a
nested structure of
||The standard deviation of the noise.|
A nested structure of
||An optional integer seed. If None, generator is seeded from the clock.|
Makes an initial state for the GaussianNoiseGenerator.
|A named tuple of (seeds, stddev).|
make_state( seeds: tf.Tensor, stddev: tf.Tensor )
Returns a new named tuple of (seeds, stddev).
next( state )
Gets next value and advances the GaussianNoiseGenerator.
||The current state (seed, noise_std).|
|A tuple of (sample, new_state) where sample is a new sample and new_state is the advanced state (seed+1, noise_std).|