pub struct GradientDescent { /* private fields */ }Expand description
Gradient descent with optional momentum.
§Update Rule
Without momentum: $\theta_{t+1} = \theta_t - \alpha \nabla f(\theta_t)$
With momentum: $v_{t+1} = \mu v_t + \alpha \nabla f(\theta_t)$, $\theta_{t+1} = \theta_t - v_{t+1}$
Implementations§
Trait Implementations§
Source§impl Optimizer for GradientDescent
impl Optimizer for GradientDescent
Auto Trait Implementations§
impl !Freeze for GradientDescent
impl RefUnwindSafe for GradientDescent
impl Send for GradientDescent
impl Sync for GradientDescent
impl Unpin for GradientDescent
impl UnwindSafe for GradientDescent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more