Struct burn_core::optim::momentum::MomentumConfig
source · pub struct MomentumConfig {
pub momentum: f64,
pub dampening: f64,
pub nesterov: bool,
}Expand description
Configuration to create momentum.
Fields§
§momentum: f64Momemtum factor
dampening: f64Dampening factor.
nesterov: boolEnables Nesterov momentum, see On the importance of initialization and momentum in deep learning.
Implementations§
source§impl MomentumConfig
impl MomentumConfig
sourcepub fn with_momentum(self, momentum: f64) -> Self
pub fn with_momentum(self, momentum: f64) -> Self
Momemtum factor
sourcepub fn with_dampening(self, dampening: f64) -> Self
pub fn with_dampening(self, dampening: f64) -> Self
Dampening factor.
sourcepub fn with_nesterov(self, nesterov: bool) -> Self
pub fn with_nesterov(self, nesterov: bool) -> Self
Enables Nesterov momentum, see [On the importance of initialization and
Trait Implementations§
source§impl Clone for MomentumConfig
impl Clone for MomentumConfig
source§impl Config for MomentumConfig
impl Config for MomentumConfig
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 MomentumConfig
impl<'de> Deserialize<'de> for MomentumConfig
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 MomentumConfig
impl Display for MomentumConfig
Auto Trait Implementations§
impl RefUnwindSafe for MomentumConfig
impl Send for MomentumConfig
impl Sync for MomentumConfig
impl Unpin for MomentumConfig
impl UnwindSafe for MomentumConfig
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