pub struct SGD { /* private fields */ }
Expand description
Stochastic Gradient Descent optimizer
Implementations§
Trait Implementations§
Source§impl Optimizer for SGD
impl Optimizer for SGD
fn update( &mut self, _param_id: &str, param: &mut Array2<f64>, gradient: &Array2<f64>, )
fn reset(&mut self)
Source§fn set_learning_rate(&mut self, lr: f64)
fn set_learning_rate(&mut self, lr: f64)
Set the learning rate dynamically (for compatibility with schedulers)
Source§fn get_learning_rate(&self) -> f64
fn get_learning_rate(&self) -> f64
Get the current learning rate
Auto Trait Implementations§
impl Freeze for SGD
impl RefUnwindSafe for SGD
impl Send for SGD
impl Sync for SGD
impl Unpin for SGD
impl UnwindSafe for SGD
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