pub struct SGD { /* private fields */ }
Expand description
Stochastic Gradient Descent optimizer.
Implementations§
Trait Implementations§
Source§impl Optimizer for SGD
impl Optimizer for SGD
Source§fn step(&mut self) -> CoreResult<()>
fn step(&mut self) -> CoreResult<()>
Step the optimizer to update variables.
Source§fn add_variable(&mut self, var: Variable)
fn add_variable(&mut self, var: Variable)
Add a variable to the optimizer.
Source§fn variables_mut(&mut self) -> &mut [Variable]
fn variables_mut(&mut self) -> &mut [Variable]
Get mutable reference to variables (for default implementation)
Source§fn accumulate_gradients(&mut self, gradients: &GradientDict) -> CoreResult<()>
fn accumulate_gradients(&mut self, gradients: &GradientDict) -> CoreResult<()>
Accumulate gradients for momentum-based optimizers
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more