pub enum OptimizerAlgorithm {
Adam {
lr: f64,
beta1: f64,
beta2: f64,
epsilon: f64,
},
AdaGrad {
lr: f64,
epsilon: f64,
},
RmsProp {
lr: f64,
alpha: f64,
epsilon: f64,
momentum: f64,
},
AdamW {
lr: f64,
beta1: f64,
beta2: f64,
epsilon: f64,
weight_decay: f64,
},
}Expand description
Choice of adaptive gradient algorithm and its hyper-parameters.
Variants§
Adam
Adam optimiser (Kingma & Ba, 2015).
Fields
AdaGrad
Adaptive gradient descent (Duchi et al., 2011).
RmsProp
Root-mean-square propagation (Hinton, 2012).
Fields
AdamW
Adam with decoupled weight decay (Loshchilov & Hutter, 2019).
Fields
Implementations§
Source§impl OptimizerAlgorithm
impl OptimizerAlgorithm
Sourcepub fn adam_default() -> Self
pub fn adam_default() -> Self
Construct an Adam instance with default hyper-parameters.
Sourcepub fn adagrad_default() -> Self
pub fn adagrad_default() -> Self
Construct an AdaGrad instance with default hyper-parameters.
Sourcepub fn rmsprop_default() -> Self
pub fn rmsprop_default() -> Self
Construct an RmsProp instance with default hyper-parameters.
Sourcepub fn adamw_default() -> Self
pub fn adamw_default() -> Self
Construct an AdamW instance with default hyper-parameters.
Trait Implementations§
Source§impl Clone for OptimizerAlgorithm
impl Clone for OptimizerAlgorithm
Source§fn clone(&self) -> OptimizerAlgorithm
fn clone(&self) -> OptimizerAlgorithm
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptimizerAlgorithm
impl Debug for OptimizerAlgorithm
Source§impl PartialEq for OptimizerAlgorithm
impl PartialEq for OptimizerAlgorithm
Source§fn eq(&self, other: &OptimizerAlgorithm) -> bool
fn eq(&self, other: &OptimizerAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OptimizerAlgorithm
Auto Trait Implementations§
impl Freeze for OptimizerAlgorithm
impl RefUnwindSafe for OptimizerAlgorithm
impl Send for OptimizerAlgorithm
impl Sync for OptimizerAlgorithm
impl Unpin for OptimizerAlgorithm
impl UnsafeUnpin for OptimizerAlgorithm
impl UnwindSafe for OptimizerAlgorithm
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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