pub fn gradient_descent_clipped(
f: impl Fn(&[f64]) -> f64,
grad: impl Fn(&[f64]) -> Vec<f64>,
x0: Vec<f64>,
lr: f64,
max_norm: f64,
tol: f64,
max_iter: u32,
) -> OptResultExpand description
Gradient descent with gradient clipping.