Function clip_gradient

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

Clip the gradient to a maximum value.