pub fn add_gradient_noise<A, D>(
gradients: &mut Array<A, D>,
noise_std: A,
seed: Option<u64>,
) -> &mut Array<A, D>Expand description
Add noise to gradients for regularization
ยงArguments
gradients- Gradients to add noise tonoise_std- Standard deviation of Gaussian noise to addseed- Optional seed for reproducible results.Some(seed)draws from a deterministically seeded generator, so the same inputs always produce the same noise;Nonedraws from the thread-local generator.