pub enum OptimizerState {
Sgd,
SgdMomentum {
momentum: f32,
v_weights: Vec<Vec<f32>>,
v_biases: Vec<Vec<f32>>,
},
Adam {
beta1: f32,
beta2: f32,
eps: f32,
t: u64,
beta1_pow: f32,
beta2_pow: f32,
m_weights: Vec<Vec<f32>>,
m_biases: Vec<Vec<f32>>,
v_weights: Vec<Vec<f32>>,
v_biases: Vec<Vec<f32>>,
},
}Expand description
Owned optimizer state.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for OptimizerState
impl Clone for OptimizerState
Source§fn clone(&self) -> OptimizerState
fn clone(&self) -> OptimizerState
Returns a duplicate of the value. Read more
1.0.0 · 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 OptimizerState
impl Debug for OptimizerState
Source§impl Default for OptimizerState
impl Default for OptimizerState
Source§fn default() -> OptimizerState
fn default() -> OptimizerState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OptimizerState
impl RefUnwindSafe for OptimizerState
impl Send for OptimizerState
impl Sync for OptimizerState
impl Unpin for OptimizerState
impl UnwindSafe for OptimizerState
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