Struct burn_core::optim::AdamWConfig
source · pub struct AdamWConfig { /* private fields */ }Expand description
AdamW configuration.
Implementations§
source§impl AdamWConfig
impl AdamWConfig
source§impl AdamWConfig
impl AdamWConfig
sourcepub fn with_beta_1(self, beta_1: f32) -> Self
pub fn with_beta_1(self, beta_1: f32) -> Self
Parameter for AdamW.
sourcepub fn with_beta_2(self, beta_2: f32) -> Self
pub fn with_beta_2(self, beta_2: f32) -> Self
Parameter for AdamW.
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: f32) -> Self
pub fn with_weight_decay(self, weight_decay: f32) -> Self
Weight decay config.
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.
Trait Implementations§
source§impl Clone for AdamWConfig
impl Clone for AdamWConfig
source§impl Config for AdamWConfig
impl Config for AdamWConfig
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 AdamWConfig
impl<'de> Deserialize<'de> for AdamWConfig
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 AdamWConfig
impl Display for AdamWConfig
Auto Trait Implementations§
impl RefUnwindSafe for AdamWConfig
impl Send for AdamWConfig
impl Sync for AdamWConfig
impl Unpin for AdamWConfig
impl UnwindSafe for AdamWConfig
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