Function clip_gradient

Source
pub fn clip_gradient<A, D>(gradient: &mut Array<A, D>, threshold: A)
where A: Float + ScalarOperand, D: Dimension,
Expand description

Clip the gradient to a maximum value.