Struct burn_core::optim::RMSPropConfig
source · pub struct RMSPropConfig { /* private fields */ }Expand description
Configuration to create the RMSProp optimizer.
Implementations§
source§impl RMSPropConfig
impl RMSPropConfig
source§impl RMSPropConfig
impl RMSPropConfig
sourcepub fn with_alpha(self, alpha: f32) -> Self
pub fn with_alpha(self, alpha: f32) -> Self
Smoothing constant.
sourcepub fn with_momentum(self, momentum: f32) -> Self
pub fn with_momentum(self, momentum: f32) -> Self
momentum for RMSProp.
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_centered(self, centered: bool) -> Self
pub fn with_centered(self, centered: bool) -> Self
if True, compute the centered RMSProp, the gradient is normalized by an estimation of its variance
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 RMSPropConfig
impl RMSPropConfig
sourcepub fn init<B: AutodiffBackend, M: AutodiffModule<B>>(
&self
) -> OptimizerAdaptor<RMSProp<B::InnerBackend>, M, B>
pub fn init<B: AutodiffBackend, M: AutodiffModule<B>>( &self ) -> OptimizerAdaptor<RMSProp<B::InnerBackend>, M, B>
Trait Implementations§
source§impl Clone for RMSPropConfig
impl Clone for RMSPropConfig
source§impl Config for RMSPropConfig
impl Config for RMSPropConfig
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 RMSPropConfig
impl<'de> Deserialize<'de> for RMSPropConfig
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 RMSPropConfig
impl Display for RMSPropConfig
Auto Trait Implementations§
impl RefUnwindSafe for RMSPropConfig
impl Send for RMSPropConfig
impl Sync for RMSPropConfig
impl Unpin for RMSPropConfig
impl UnwindSafe for RMSPropConfig
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