Struct burn_core::optim::AdamConfig
source · pub struct AdamConfig { /* private fields */ }Expand description
Adam configuration.
Implementations§
source§impl AdamConfig
impl AdamConfig
source§impl AdamConfig
impl AdamConfig
sourcepub fn with_beta_1(self, beta_1: f32) -> Self
pub fn with_beta_1(self, beta_1: f32) -> Self
Parameter for Adam.
sourcepub fn with_beta_2(self, beta_2: f32) -> Self
pub fn with_beta_2(self, beta_2: f32) -> Self
Parameter for Adam.
sourcepub fn with_epsilon(self, epsilon: f32) -> Self
pub fn with_epsilon(self, epsilon: f32) -> Self
A value required for numerical stability.
sourcepub fn with_weight_decay(self, weight_decay: Option<WeightDecayConfig>) -> Self
pub fn with_weight_decay(self, weight_decay: Option<WeightDecayConfig>) -> Self
Set the default value for the field.
sourcepub fn with_grad_clipping(
self,
grad_clipping: Option<GradientClippingConfig>
) -> Self
pub fn with_grad_clipping( self, grad_clipping: Option<GradientClippingConfig> ) -> Self
Set the default value for the field.
source§impl AdamConfig
impl AdamConfig
sourcepub fn init<B: AutodiffBackend, M: AutodiffModule<B>>(
&self
) -> impl Optimizer<M, B>
pub fn init<B: AutodiffBackend, M: AutodiffModule<B>>( &self ) -> impl Optimizer<M, B>
Trait Implementations§
source§impl Clone for AdamConfig
impl Clone for AdamConfig
source§impl Config for AdamConfig
impl Config for AdamConfig
source§fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
fn save<P: AsRef<Path>>(&self, file: P) -> Result<()>
Saves the configuration to a file. Read more
source§fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
fn load<P: AsRef<Path>>(file: P) -> Result<Self, ConfigError>
Loads the configuration from a file. Read more
source§fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
fn load_binary(data: &[u8]) -> Result<Self, ConfigError>
Loads the configuration from a binary buffer. Read more
source§impl<'de> Deserialize<'de> for AdamConfig
impl<'de> Deserialize<'de> for AdamConfig
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
source§impl Display for AdamConfig
impl Display for AdamConfig
Auto Trait Implementations§
impl RefUnwindSafe for AdamConfig
impl Send for AdamConfig
impl Sync for AdamConfig
impl Unpin for AdamConfig
impl UnwindSafe for AdamConfig
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