pub struct Adam { /* private fields */ }
Expand description
Adam Optimizer, with possibility of using AdaBound
Implementations§
Source§impl Adam
impl Adam
Sourcepub fn set_final_lr(&mut self, learning_rate: Float) -> &mut Self
pub fn set_final_lr(&mut self, learning_rate: Float) -> &mut Self
Set final learning rate for AdaBound (SGD)
Sourcepub fn set_lambda(&mut self, coeff: Float) -> &mut Self
pub fn set_lambda(&mut self, coeff: Float) -> &mut Self
Set lambda factor for weight decay
Sourcepub fn set_gamma(&mut self, coeff: Float) -> &mut Self
pub fn set_gamma(&mut self, coeff: Float) -> &mut Self
Set gamma factor for AdaBound bounding convergence
Sourcepub fn set_beta1(&mut self, beta: Float) -> &mut Self
pub fn set_beta1(&mut self, beta: Float) -> &mut Self
Set beta1 coefficient (for exponential moving average of first moment)
Sourcepub fn set_beta2(&mut self, beta: Float) -> &mut Self
pub fn set_beta2(&mut self, beta: Float) -> &mut Self
Set beta2 coefficient (for exponential moving average of second moment)
Sourcepub fn set_eps(&mut self, epsilon: Float) -> &mut Self
pub fn set_eps(&mut self, epsilon: Float) -> &mut Self
Set epsilon to avoid divide by zero (fuzz factor)
Sourcepub fn set_adabound(&mut self, use_bound: bool) -> &mut Self
pub fn set_adabound(&mut self, use_bound: bool) -> &mut Self
Set usage of AdaBound
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Adam
impl<'de> Deserialize<'de> for Adam
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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