Struct burn::optim::AdaGradConfig
source · pub struct AdaGradConfig { /* private fields */ }Expand description
AdaGrad configuration.
Implementations§
source§impl AdaGradConfig
impl AdaGradConfig
sourcepub fn new() -> AdaGradConfig
pub fn new() -> AdaGradConfig
Create a new instance of the config.
source§impl AdaGradConfig
impl AdaGradConfig
sourcepub fn with_lr_decay(self, lr_decay: f64) -> AdaGradConfig
pub fn with_lr_decay(self, lr_decay: f64) -> AdaGradConfig
Set the default value for the field.
sourcepub fn with_epsilon(self, epsilon: f32) -> AdaGradConfig
pub fn with_epsilon(self, epsilon: f32) -> AdaGradConfig
Set the default value for the field.
sourcepub fn with_weight_decay(
self,
weight_decay: Option<WeightDecayConfig>
) -> AdaGradConfig
pub fn with_weight_decay( self, weight_decay: Option<WeightDecayConfig> ) -> AdaGradConfig
Set the default value for the field.
sourcepub fn with_grad_clipping(
self,
grad_clipping: Option<GradientClippingConfig>
) -> AdaGradConfig
pub fn with_grad_clipping( self, grad_clipping: Option<GradientClippingConfig> ) -> AdaGradConfig
Set the default value for the field.
Trait Implementations§
source§impl Clone for AdaGradConfig
impl Clone for AdaGradConfig
source§fn clone(&self) -> AdaGradConfig
fn clone(&self) -> AdaGradConfig
Returns a copy 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 Config for AdaGradConfig
impl Config for AdaGradConfig
source§fn save<P>(&self, file: P) -> Result<(), Error>where
P: AsRef<Path>,
fn save<P>(&self, file: P) -> Result<(), Error>where P: AsRef<Path>,
Saves the configuration to a file. Read more
source§fn load<P>(file: P) -> Result<Self, ConfigError>where
P: AsRef<Path>,
fn load<P>(file: P) -> Result<Self, ConfigError>where P: AsRef<Path>,
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 AdaGradConfig
impl<'de> Deserialize<'de> for AdaGradConfig
source§fn deserialize<D>(
deserializer: D
) -> Result<AdaGradConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<AdaGradConfig, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for AdaGradConfig
impl Display for AdaGradConfig
source§impl Serialize for AdaGradConfig
impl Serialize for AdaGradConfig
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for AdaGradConfig
impl Send for AdaGradConfig
impl Sync for AdaGradConfig
impl Unpin for AdaGradConfig
impl UnwindSafe for AdaGradConfig
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