pub struct Adam { /* private fields */ }
Expand description
Adam optimizer.
Implementations§
Trait Implementations§
Source§impl Optimizer for Adam
impl Optimizer for Adam
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 Adam
impl !RefUnwindSafe for Adam
impl !Send for Adam
impl !Sync for Adam
impl Unpin for Adam
impl !UnwindSafe for Adam
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