Skip to main content

add_gradient_noise

Function add_gradient_noise 

Source
pub fn add_gradient_noise<A, D>(
    gradients: &mut Array<A, D>,
    noise_std: A,
    seed: Option<u64>,
) -> &mut Array<A, D>
where A: Float + ScalarOperand, D: Dimension,
Expand description

Add noise to gradients for regularization

ยงArguments

  • gradients - Gradients to add noise to
  • noise_std - Standard deviation of Gaussian noise to add
  • seed - Optional seed for reproducible results