pub struct AdamOptimizer { /* private fields */ }Expand description
Adam optimizer with bias correction.
Implementations§
Trait Implementations§
Source§impl Optimizer for AdamOptimizer
impl Optimizer for AdamOptimizer
Source§fn step(
&mut self,
weights: &mut Array1<f32>,
bias: &mut f32,
weight_grad: &Array1<f32>,
bias_grad: f32,
)
fn step( &mut self, weights: &mut Array1<f32>, bias: &mut f32, weight_grad: &Array1<f32>, bias_grad: f32, )
Apply a gradient step. Read more
Source§fn learning_rate(&self) -> f32
fn learning_rate(&self) -> f32
Return the current learning rate.
Source§fn set_learning_rate(&mut self, lr: f32)
fn set_learning_rate(&mut self, lr: f32)
Override the current learning rate (called by the LR scheduler).
Auto Trait Implementations§
impl Freeze for AdamOptimizer
impl RefUnwindSafe for AdamOptimizer
impl Send for AdamOptimizer
impl Sync for AdamOptimizer
impl Unpin for AdamOptimizer
impl UnsafeUnpin for AdamOptimizer
impl UnwindSafe for AdamOptimizer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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